-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (43 loc) · 1.4 KB
/
test_n_lint.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
49
50
51
52
53
54
55
56
name: CI
on: [push]
permissions:
contents: read
jobs:
test_n_lint:
runs-on: [ubuntu-latest]
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.5"]
steps:
- uses: actions/checkout@v3
- name: Install poetry ${{ matrix.poetry-version }}
run: |
pipx install "poetry~=${{ matrix.poetry-version }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry" # cache dependencies
- name: Debug environment details
run: |
poetry debug info
- name: Install dependencies
run: |
poetry install --no-interaction --no-root
poetry show
- name: Test with pytest & pytest-cov
env:
FC_TEST_POSTGRES_DEFAULT_DB_CONNINFO: ${{ secrets.FC_TEST_POSTGRES_DEFAULT_DB_CONNINFO }}
run: |
poetry run poe test
- name: Send coverage results to coveralls.io
if: github.repository == 'juanmirocks/fastchecks'
uses: coverallsapp/github-action@v2
- name: Lint with multiple tasks, including security checks
run: |
poetry run poe lint_all
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/python-3.10@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}