-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (75 loc) · 2.53 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: OCSP-Checker
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os:
[
ubuntu-20.04,
ubuntu-22.04,
windows-2022,
windows-2019,
macos-12,
macos-11,
]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3.3.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # tag=v4.7.1
with:
python-version: ${{ matrix.python-version }}
- name: Install tools
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install pytest
run: |
python -m pip install pytest pytest-cov
- name: Install requirements
run: |
python -m pip install -r requirements.txt
- name: Run pytest
run: |
pytest -v --junitxml=test-output.xml --cov=ocspchecker --cov-report xml
- name: Upload test results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3.1.2
with:
name: pytest-results for ${{ matrix.python-version }}
path: "**/test-output.xml"
- name: Upload coverage results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3.1.2
with:
name: pytest-results for ${{ matrix.python-version }}
path: "**/coverage.xml"
if: ${{ always() }}
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3.3.0
- name: Set up Python 3.x
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # tag=v4.7.1
with:
python-version: "3.9"
architecture: "x64"
- name: Install tools
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install build twine
- name: Build pypy package
run: |
python -m build
- name: Check package description
run: |
twine check dist/*
- name: Generate provenance
uses: slsa-framework/github-actions-demo@v0.1
with:
artifact_path: dist/
- name: Upload provenance
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3.1.2
with:
name: OCSP-Checker provenance
path: build.provenance