Skip to content

fixup! try running on a m1 runner #14

fixup! try running on a m1 runner

fixup! try running on a m1 runner #14

Workflow file for this run

---
name: Tests
on:
pull_request:
branches:
- "*"
push:
branches:
- "*"
# for merge queue
merge_group:
jobs:
lint:
name: "⌨ Lint"
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v4
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@v4
- name: Install test dependencies
run: |
sudo apt install -y podman python3-pytest flake8
- name: Run tests
run: |
# 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"
# needed to get latest cpu
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup up python
uses: actions/setup-python@v4
- name: Setup up podman
run: |
sysctl -a
brew install podman
# need to map only a subset of /var/tmp into the bootc tests
sudo mkdir -p /var/tmp/bootc-tests
# TODO: this is "security_model=mapped" is needed or the build
# will not be able to be copied back to the host dir with an
# "cp: failed to preserve ownership for '/output/qcow2/./disk.qcow2': Operation not permited
podman machine init --rootful -v /var/tmp/bootc-tests:/var/tmp/bootc-tests:security_model=mapped
podman machine start
# debug only
podman info
- name: Install test dependencies
run: |
sudo pip install pytest flake8
- name: Run tests
run: |
sudo pytest -s -vv