Update tutorial.ipynb #417
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: tests | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "master" | |
jobs: | |
changes: | |
name: Checking changed files | |
runs-on: ubuntu-latest | |
outputs: | |
keepgoing: ${{ steps.changed-files.outputs.any_changed }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
*.{yaml,yml,py,toml} | |
**/*.{yaml,yml,py,toml} | |
tests | |
- name: List all changed files | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
echo "$file was changed" | |
done | |
echo ${{ steps.changed-files.outputs.any_changed }} | |
tests: | |
needs: | |
- changes | |
if: needs.changes.outputs.keepgoing == 'true' | |
timeout-minutes: 720 | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
max-parallel: 6 | |
matrix: | |
environment: [py310, py311, py312] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
name: Build and test | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Pixi Environment | |
uses: prefix-dev/[email protected] | |
with: | |
environments: ${{ matrix.environment }} | |
pixi-version: v0.39.2 | |
cache: false | |
- name: Test build, unit tests | |
run: | | |
pixi run -e ${{ matrix.environment }} test | |
- name: Show coverage | |
if: matrix.os == 'ubuntu-latest' && matrix.environment == 'py312' | |
run: | | |
pixi run -e ${{ matrix.environment }} coverage | |
- name: Upload coverage to Codecov | |
if: matrix.os == 'ubuntu-latest' && matrix.environment == 'py312' && github.actor != 'dependabot[bot]' && github.actor == 'zktuong' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
env_vars: ${{ format('OS={0},PYTHON={1}', matrix.os, matrix.environment) }} | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: true |