Makefile: split test stubs #98
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: 'oci-image' | |
on: | |
push: | |
branches: main | |
pull_request: | |
jobs: | |
docker-buildx: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# test with nonstandard uid and gid | |
build-args: | |
- | | |
UID=1234 | |
GID=1235 | |
- | | |
UID=1000 | |
GID=1000 | |
- '' | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and load nvim image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Containerfile | |
build-args: ${{ matrix.build-args }} | |
load: true | |
tags: l7/nvim:latest | |
# could enable push to gh registry | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Build and load node-runner image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: sidecars/node-runner/Containerfile | |
build-args: ${{ matrix.build-args }} | |
load: true | |
tags: l7/node:20-bookworm | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
test-make: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
cmd: | |
- '' | |
- docker | |
- podman | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
- ubuntu-24.04 | |
image: | |
- nvim | |
- runner | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: make IMAGE_NAME=localhost/foo-${{ matrix.image }} IMAGE_TAG=bar CMD=${{ matrix.cmd }} | |
if: ${{ matrix.cmd != '' }} | |
env: | |
CMD: ${{ matrix.cmd }} | |
- run: make IMAGE_NAME=localhost/foo-${{ matrix.image }} IMAGE_TAG=bar | |
if: ${{ matrix.cmd == '' }} | |
- run: ${{ matrix.cmd }} image inspect localhost/foo-${{ matrix.image }}:bar | |
if: ${{ matrix.cmd != '' }} | |
- run: podman image inspect localhost/foo-${{ matrix.image }}:bar | |
if: ${{ matrix.cmd == '' }} | |
- run: make test |