Check if the test_login.py works #483
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: python | |
on: pull_request | |
env: | |
APP_API_KEY: ${{ secrets.APP_API_KEY }} | |
jobs: | |
lint_stylecheck: | |
name: Lint and Stylecheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Get all changed files | |
id: get-changed-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
files_yaml: | | |
src: | |
- 'python/**/*.py' | |
- '!python/tests/**/*.py' | |
test: | |
- 'python/tests/**/*.py' | |
- name: install deps | |
run: pip install ruff==0.4.2 | |
- name: ruff on python files | |
if: steps.get-changed-files.outputs.src_any_changed == 'true' | |
env: | |
SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }} | |
run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES | |
- name: ruff on test files | |
if: steps.get-changed-files.outputs.test_any_changed == 'true' | |
env: | |
TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }} | |
run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES | |
- name: ruff format --check $ALL_CHANGED_FILES | |
env: | |
ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }} | |
run: ruff format $ALL_CHANGED_FILES | |
unit_tests_ubuntu_utc: | |
name: Unit Testing (Ubuntu) | |
needs: lint_stylecheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Timezone | |
run: sudo timedatectl set-timezone UTC | |
- uses: actions/checkout@v4 | |
- name: Copy README | |
run: cp README.md python/ | |
- uses: actions/setup-python@v5 | |
name: Setup Python | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
cache-dependency-path: "python/setup.py" | |
- run: pip install -e python[dev] | |
- name: Display Python version | |
run: python --version | |
- name: Run Pytest suite | |
run: pytest python/tests |