Skip to content

Support stdin output #684

Support stdin output

Support stdin output #684

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --hook-stage=manual
- name: Help message if pre-commit fail
if: ${{ failure() }}
run: |
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files --hook-stage=manual"
test:
name: Run tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: "3.11"
- name: Install dependencies
run: |
mamba install pip nodejs=18
pip install ".[test]"
- name: Build JavaScript assets
working-directory: javascript
run: |
yarn
yarn build
- name: Linter check
if: ${{ !contains(matrix.os, 'windows') }}
working-directory: javascript
run: |
yarn lint:check
- name: Integrity check
if: ${{ !contains(matrix.os, 'windows') }}
working-directory: javascript
run: |
set -ex
yarn integrity
if [[ $(git ls-files --exclude-standard -m | wc -l) > 0 ]]
then
echo "Integrity test failed; please run locally 'yarn integrity' and commit the changes"
exit 1
fi
- name: Run JS tests
working-directory: javascript
run: |
yarn build:test
yarn test:cov
- name: Run Python tests
run: |
python -m pytest -v