-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (66 loc) · 2.17 KB
/
continuous-integration.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Check out the commit
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ~${{ matrix.version }}
- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install tomli
- name: Test install
run: python3 -m pip install .
- name: Test with pytest
run: python3 -m pytest --cov=sansmic examples/ tests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Check documentation coverage
# run: |
# make coverage
# mv build/coverage/python.txt ../docs-coverage-report-${{ matrix.version }}.txt
# working-directory: ./docs
# - name: Archive documentation coverage results
# uses: actions/upload-artifact@v3
# with:
# name: docs-coverage-report-${{ matrix.version }}
# path: docs-coverage-report-${{ matrix.version }}.txt
- name: Test uninstall
run: python3 -m pip uninstall -y my-repository-name
# commits:
# runs-on: ubuntu-latest
# steps:
# - name: Harden Runner
# uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
# with:
# egress-policy: audit
# - name: Conventional Commits
# uses: taskmedia/action-conventional-commits@9148865058f63a6cb560ff4bfd7d534505f43646 # v1.1.3
# with:
# types: >
# build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test