[ci] use pre-commit, update actions #135
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: Continuous Integration | |
# alwas run CI on new commits to any branch | |
on: push | |
jobs: | |
test: | |
name: ${{ matrix.task }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- task: linting | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: 3.11 | |
- name: linting | |
if: matrix.task == 'linting' | |
shell: bash | |
run: | | |
pip install --upgrade pre-commit | |
pre-commit run --all-files | |
all-tests-successful: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@v1.2.2 | |
with: | |
jobs: ${{ toJSON(needs) }} |