-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (54 loc) · 1.69 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-
- name: Set up pre-commit cache
uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: ${{ runner.os }}-pre-commit-
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install GiNaC
run: sudo apt-get install -y libginac-dev
- name: Install dependencies
run: poetry install --no-interaction
- name: Run linter
run: make lint
- name: Run mypy
run: make mypy
- name: Run unit tests
run: make ARGS="--exitfirst" test
- name: Build docs
run: make docs
- name: Deploy docs
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/build/html