name: Integration Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
packages: write
env:
CARGO_TERM_COLOR: always
PLATFORM: linux/amd64
jobs:
build-base:
name: Build Base Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Build and (locally) load base image
uses: docker/build-push-action@v6
with:
context: .
file: tests/Dockerfile.builder
platforms: ${{ env.PLATFORM }}
cache-from: type=gha,scope=dela-builder
cache-to: type=gha,scope=dela-builder,mode=max
load: true
push: false
tags: dela-builder:latest
shell-tests:
name: Shell Tests
needs: build-base
runs-on: ubuntu-latest
strategy:
matrix:
shell: [unit, noinit, zsh, bash, fish, pwsh]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Load cached builder image
uses: docker/build-push-action@v6
with:
context: .
file: tests/Dockerfile.builder
platforms: ${{ env.PLATFORM }}
cache-from: type=gha,scope=dela-builder
load: true
tags: dela-builder:latest
- name: Run ${{ matrix.shell }} tests
env:
VERBOSE: 1
DOCKER_PLATFORM: ${{ env.PLATFORM }}
BUILDER_IMAGE: dela-builder:latest
run: ./tests/run_tests.sh ${{ matrix.shell }}