Skip to content

github: cache OSBUILD_TEST_STORE accross runs #30

github: cache OSBUILD_TEST_STORE accross runs

github: cache OSBUILD_TEST_STORE accross runs #30

Workflow file for this run

name: Tests
on: [pull_request, push]
jobs:
test_suite:
name: "Unittest"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test:
- "test.mod"
- "test.run.test_assemblers"
- "test.run.test_boot"
- "test.run.test_devices"
- "test.run.test_executable"
- "test.run.test_mount"
- "test.run.test_noop"
- "test.run.test_sources"
- "test.run.test_stages"
environment:
- "py36"
- "py39"
- "py311"
- "py312"
steps:
- name: "Clone Repository"
uses: actions/checkout@v3

Check failure on line 29 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

You have an error in your yaml syntax on line 29
- name: Get OSBUILD_TEST_STORE files
if: "${{ matrix.test }}" == "tests.run_stages"
uses: actions/cache@v3
with:
path: "${{ github.workspace }}/.osbuild-test-store"
key: "${{ matrix.test }}"
- name: "Run"
uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b
with:
image: ghcr.io/osbuild/osbuild-ci:latest-202308241910
run: |
mkdir -p "/osb/host/${{ github.workspace }}/.osbuild-test-store"
# debug only
ls -a "/osb/host/${{ github.workspace }}/.osbuild-test-store"
touch "/osb/host/${{ github.workspace }}/.osbuild-test-store/lala"
ls -a "/osb/host/${{ github.workspace }}/.osbuild-test-store"
# this runs inside a docker container so the path needs adjusting
OSBUILD_TEST_STORE="/osb/host/${{ github.workspace }}/.osbuild-test-store" \
TEST_CATEGORY="${{ matrix.test }}" \
tox -e "${{ matrix.environment }}"
- name: Debug cache (can be removed)
run: |
ls -a "/${{ github.workspace }}/.osbuild-test-store"