Merge pull request #345 from dflook/hide-outdated #1025
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit test | |
on: | |
- push | |
jobs: | |
pytest_amd64: | |
runs-on: ubuntu-latest | |
name: pytest amd64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- 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 | |
# | |
# - 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-latest | |
name: OpenTofu | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check tofu actions are up to date | |
run: | | |
python3 tofu/tofuize.py | |
git diff --exit-code |