-
Notifications
You must be signed in to change notification settings - Fork 15
66 lines (54 loc) · 1.75 KB
/
pytest.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
---
name: Pytest and code Coverage
on:
push:
branches:
- "*"
pull_request:
branches:
- main
schedule:
# Run every night at 04:00 (GitHub Actions timezone)
# in order to catch when unfrozen dependency updates
# break the use of the library.
- cron: "4 0 * * *"
jobs:
pytest:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install required system packages for Ubuntu
run: sudo apt-get install -y python3-pip libsecp256k1-dev python3-coverage
if: startsWith(matrix.os, 'ubuntu-')
- name: Install required system packages for macOS
if: startsWith(matrix.os, 'macos-')
run: |
brew update
brew tap cuber/homebrew-libsecp256k1
brew install libsecp256k1
brew install automake
- name: Set up Python for macOS
if: startsWith(matrix.os, 'macos')
uses: actions/setup-python@v2
with:
python-version: 3.11
- run: python3 -m venv /tmp/venv
- run: /tmp/venv/bin/python -m pip install --upgrade pip hatch coverage
# Only run coverage on one OS
- run: /tmp/venv/bin/hatch run testing:test
if: matrix.os != 'ubuntu-24.04'
- name: Test with coverage
if: matrix.os == 'ubuntu-24.04'
run: |
/tmp/venv/bin/hatch run testing:cov
- uses: codecov/[email protected]
if: matrix.os == 'ubuntu-24.04'
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: aleph-im/aleph-client
file: ./coverage.xml
directory: /home/runner/work/aleph-client/aleph-client