Chg(gha): python version to matrix of 3.6-11 #182
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
# GitHub Action for mffpy to run linting and tests | |
--- | |
name: lint-and-test | |
on: | |
push: # This will make the workflow run again after a successful PR. | |
branches: | |
- master | |
- develop | |
pull_request: # This will trigger on all pull requests. | |
jobs: | |
# Set the job key. The key is displayed as the job name | |
# when a job name is not provided. | |
test_mffpy: | |
# Name the job | |
name: Lint and Test | |
strategy: | |
matrix: | |
python-version: ["3.6.7", "3.8", "3.9", "3.10", "3.11"] | |
# Set the type of machine to run on | |
runs-on: ubuntu-20.04 | |
steps: | |
# Check out the latest commit from the current branch | |
- name: Checkout Current Branch | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ./venv | |
key: v1-dependencies-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: v1-dependencies- | |
- name: Install Package | |
run: pip install . | |
- name: Install Development Dependences | |
run: pip install -r requirements-dev.txt | |
- name: Linting | |
run: flake8 | |
- name: Run Tests | |
run: make test |