-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 996 Bytes
/
workflow.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
name: Linting and tests
on:
push:
branches:
- main
pull_request:
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
python -m pip install pytest
pre-commit install
- name: Run pre-commit
run: pre-commit run --all-files --color always
- name: Install octopuslite
run: |
pip install -e .
- name: Run tests
run: |
pytest