-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (59 loc) · 1.83 KB
/
tests.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
# tests.yml
name: tests
on:
push:
branches: main
pull_request:
branches: main
jobs:
pytest:
runs-on: ubuntu-latest
container: tensorflow/tensorflow:${{ matrix.version }}
strategy:
matrix:
version:
- 2.17.0
- 2.16.1
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install dependencies and pidgan
shell: bash
run: |
pip install --upgrade pip build
pip install -r requirements/base.txt -r requirements/tests.txt
apt-get update
apt-get -y upgrade
apt-get install -y python3-venv
python -m build
pip install dist/*.whl --force-reinstall --no-deps
apt-get install -y git-all
pip install git+https://github.com/landerlini/hopaas_client.git # hopaas-client not yet on PyPI
- name: Run pytest checks
shell: bash
env:
HOPAAS_TOKEN: ${{ secrets.HOPAAS_TOKEN }}
run: |
python tests/config/config.py --no-interactive -t "$HOPAAS_TOKEN"
pytest --cov tests/
- name: Upload coverage to Codecov
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
./codecov -R . -t "$CODECOV_TOKEN"