Skip to content

Commit

Permalink
chore: multiplatform build
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Aug 21, 2024
1 parent 4f77ae7 commit 3d872c1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
50 changes: 48 additions & 2 deletions .github/workflows/test-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,51 @@ name: Test install script
on: [ push, pull_request ]

jobs:
test_script:
test_script_linux:
name: Test install script on Linux ${{ matrix.os }}, ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: centos
version: latest
- os: centos
version: 8
- os: centos
version: 7

- os: opensuse
version: latest
- os: opensuse
version: 15

- os: ubuntu
version: latest
- os: ubuntu
version: jammy
- os: ubuntu
version: focal
- os: ubuntu
version: noble

- os: debian
version: latest
- os: debian
version: buster

- os: alpine
version: latest
- os: alpine
version: edge
- os: alpine
version: 3

- os: fedora
version: latest
- os: fedora
version: 41
- os: fedora
version: 40
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -19,6 +62,9 @@ jobs:
with:
platforms: ${{ steps.qemu.outputs.platforms }}

- name: Pull without cache
run: docker pull ghcr.io/stephane-segning/bats-docker:${{ matrix.os }}-${{ matrix.version }}

- name: Test script
run: |
docker run --rm -v "$PWD:/app" bats/bats:latest /app/scripts/tests/test-script.bats
docker run --rm -v "$PWD:/app" ghcr.io/stephane-segning/bats-docker:${{ matrix.os }}-${{ matrix.version }} bats /app/scripts/tests/test-script.bats
2 changes: 1 addition & 1 deletion scripts/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ The BATS framework is used to test the scripts in this project. The tests are wr
located in the `scripts/tests` directory.

```bash
docker run --rm -it -v "$PWD:/app" bats/bats:latest /app/scripts/tests/test-script.bats
docker run --rm -it -v "$PWD:/app" ghcr.io/stephane-segning/bats-docker:alpine-latest bats /app/scripts/tests/test-script.bats
```

0 comments on commit 3d872c1

Please sign in to comment.