-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (37 loc) · 993 Bytes
/
main.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
name: main
on:
push:
branches: [$default-branch]
pull_request: {}
jobs:
main:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_IN_PROJECT: true
steps:
- uses: actions/checkout@v3
- uses: google/osv-scanner/actions/scanner@main
with:
to-scan: poetry.lock
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry==1.6.1
- name: cache venv
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- run: poetry install
- name: static analysis
run: |
poetry run black --check src tests
poetry run mypy src tests
- name: run tests
run: |
poetry run pytest
poetry run autotrash --help