-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (39 loc) · 1.26 KB
/
linting-and-testing.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
38
39
40
41
42
43
44
45
46
47
48
name: Tests
# event that triggers workflow
# runs on every commit
on:
push:
jobs:
linting-and-testing:
# specifies the os that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.11]
steps:
# downloads the repository code to the runner's file system for workflow access
- uses: actions/checkout@v2
# sets up python environment with specified versions
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# get rid of DeprecationWarning related to Jupyter paths when running pytest
- name: Set JUPYTER_PLATFORM_DIRS environment variable
env:
JUPYTER_PLATFORM_DIRS: 1
run: |
echo "JUPYTER_PLATFORM_DIRS=${JUPYTER_PLATFORM_DIRS}" >> $GITHUB_ENV
# installs poetry without automatic creation of a virtual environment
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Install dependencies
run: poetry install --extras "dev"
- name: Run type checker
run: mypy vessim
- name: Run linter
run: ruff .
- name: Run tests
run: python -m pytest