-
-
Notifications
You must be signed in to change notification settings - Fork 159
81 lines (71 loc) · 2.24 KB
/
test.yaml
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
name: Unit test
on:
- push
permissions:
contents: read
jobs:
pytest_amd64:
runs-on: ubuntu-24.04
name: pytest amd64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
gpg --recv-keys C874011F0AB405110D02105534365D9472D7468F \
&& echo "C874011F0AB405110D02105534365D9472D7468F:6:" | gpg --import-ownertrust
- name: Run tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TERRAFORM_ACTIONS_GITHUB_TOKEN: No
run: |
GNUPGHOME=$HOME/.gnupg PYTHONPATH=image/tools:image/src pytest tests
# buildjet doesn't start the job most of the time
# pytest_arm64:
# runs-on: buildjet-2vcpu-ubuntu-2204-arm
# name: pytest arm64
# needs: pytest_amd64
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r tests/requirements.txt
#
# gpg --recv-keys C874011F0AB405110D02105534365D9472D7468F \
# && echo "C874011F0AB405110D02105534365D9472D7468F:6:" | gpg --import-ownertrust
#
# - name: Run tests
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# TERRAFORM_ACTIONS_GITHUB_TOKEN: No
# run: |
# GNUPGHOME=$HOME/.gnupg PYTHONPATH=image/tools:image/src pytest tests
tofu:
runs-on: ubuntu-24.04
name: OpenTofu actions
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check tofu actions are up to date
run: |
python3 tofu/tofuize.py
git diff --exit-code