test: test both quay.io/centos-bootc/{centos,fedora}-bootc:{eln,stream9}
#548
Workflow file for this run
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: Tests | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- main | |
# for merge queue | |
merge_group: | |
jobs: | |
lint: | |
name: "⌨ Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.19 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Apt update | |
run: sudo apt update | |
# This is needed for the container upload dependencies | |
- name: Install libgpgme devel package | |
run: sudo apt install -y libgpgme-dev | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54.2 | |
args: --timeout 5m0s | |
working-directory: bib | |
shellcheck: | |
name: "🐚 Shellcheck" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 | |
with: | |
ignore: vendor # We don't want to fix the code in vendored dependencies | |
env: | |
# don't check /etc/os-release sourcing, allow useless cats to live inside our codebase, and | |
# allow seemingly unreachable commands | |
SHELLCHECK_OPTS: -e SC1091 -e SC2002 -e SC2317 | |
integration: | |
# TODO: run this also via tmt/testing-farm | |
name: "Integration" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup up python | |
uses: actions/setup-python@v5 | |
- name: Apt update | |
run: sudo apt update | |
- name: Install test dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y podman python3-pytest python3-paramiko python3-boto3 flake8 qemu-system-x86 | |
- name: Run tests | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
# make sure test deps are available for root | |
sudo -E pip install --user -r test/requirements.txt | |
# podman needs (parts of) the environment but will break when | |
# XDG_RUNTIME_DIR is set. | |
# TODO: figure out what exactly podman needs | |
sudo -E XDG_RUNTIME_DIR= pytest-3 -s -vv | |
integration-macos: | |
name: "Integration macos" | |
# disabled GH runner as it takes ~50min to run this test, self-hosted | |
# is much faster (~15min) | |
#runs-on: macos-13 # needed to get latest cpu | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup up python | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
- run: python3 -m pip install -r test/requirements.txt | |
- name: Setup up podman | |
run: | | |
brew install podman netcat | |
if ! podman machine inspect; then | |
podman machine init --rootful | |
podman machine set --cpus 4 --memory 4096 | |
fi | |
if [ "$(podman machine inspect --format='{{.State}}')" != "running" ]; then | |
podman machine start | |
fi | |
- name: Run tests | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
pytest -rs -s -vv --basetemp="${TMPDIR}/tmp" |