Update GitHub actions #129
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: Test | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
- dev | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Use npm cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.npm | |
key: npm | |
- name: Use pip cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ matrix.python-version }} | |
- name: Use tox cache | |
uses: actions/[email protected] | |
with: | |
path: .tox | |
key: tox-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }} | |
- name: Install test requirements | |
run: | | |
make install-test-deps | |
sudo npm install -g prettier | |
- name: Run tests | |
run: make test | |
- name: Run codecov | |
uses: codecov/[email protected] |