Removed irrelevant parts #12
This file contains hidden or 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: Run Tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 8 | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
pip install . | |
pip install autopep8 flake8 ruff coverage | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Test with autopep8 | |
run: autopep8 src/bigquery_migrations/* | |
- name: Test with flake8 | |
run: flake8 src/bigquery_migrations/* | |
- name: Test with ruff | |
run: ruff check src/bigquery_migrations/ | |
- name: Run unit tests with coverage | |
run: | | |
coverage run -m unittest discover | |
coverage html --skip-empty | |
- name: Test with unittest | |
run: python -m unittest discover tests -v | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-html-report-${{ matrix.python-version }} | |
path: htmlcov/ | |
retention-days: 7 |