Running Python CI jobs #199
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: Running Python CI jobs | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 3' | |
jobs: | |
python-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install yapf pytest pytest-cov | |
- name: Lint with yapf | |
run: | | |
./.github/check_code_formatting.sh | |
- name: Test with pytest | |
run: | | |
./.github/run_tests.sh | |
installation-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get repository | |
uses: actions/checkout@v3 | |
- name: Set up Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Show help | |
run: | | |
# we should be able to execute from any directory now | |
cd /tmp/ | |
raviewer --help |