-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 916 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Test
on:
# push:
# branches:
# - main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
slow_tests:
description: 'Run slow tests'
type: boolean
default: false
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.10.5
- uses: isort/isort-action@master
with:
isortVersion: "5.10.1"
configuration: "--profile black --check-only --diff"
sortPaths: "stackerlberg"
- uses: psf/black@stable
with:
src: "stackerlberg"
- name: Install dependencies
run: pip install -e ".[tests,format]"
- name: Run tests
run: if ${{ inputs.slow_tests || false }}; then pytest --rootdir . ; else pytest -m "not slow" --rootdir . ; fi