-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.25 KB
/
ci.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
name: CI
# Main CI pipeline of the repository.
#
# Overview:
# Lint --> test doc build -\
# \-> test code ---> deploy docs (*) -> release (**)
#
# (*): only on push of primary branches + release tags
# (**): only for release version tags (vX.Y.Z)
on:
push:
branches: [main, dev]
tags: ["v*.*.*"]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
lint:
# run general checks that do not require installing the package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install poe, pre-commit and safety
run: pip install poethepoet pre-commit safety
# NOTE: using custom cache, to include pre-commit linters + deps
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: ${{ hashFiles('.pre-commit-config.yaml') }}-pre-commit
- name: Check that all static analysis tools run without errors
run: poetry run poe lint --all-files
- name: Scan dependencies for known vulnerabilities
run: safety check -r pyproject.toml