This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/.github/workflows/test-integration.yml
Gerhard Lazu 1b17d3b9e2
Do not run lint & tests on unrelated file changes
These paths shouldn't trigger lint or test runs.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2022-02-04 12:00:54 +00:00

79 lines
2.2 KiB
YAML

name: "Test Integration"
on:
push:
branches: [main]
ignore-paths:
- 'docs/**'
- 'infra/**'
- 'website/**'
- '.gitignore'
- '.golangci.yml'
- '.goreleaser.yml'
- 'Dockerfile'
- 'README.md'
- 'install.ps1'
- 'semver'
- 'tracing.compose.yaml'
pull_request:
branches: [main]
ignore-paths:
- 'docs/**'
- 'infra/**'
- 'website/**'
- '.gitignore'
- '.golangci.yml'
- '.goreleaser.yml'
- 'Dockerfile'
- 'README.md'
- 'install.ps1'
- 'semver'
- 'tracing.compose.yaml'
jobs:
integration:
name: Integration
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: "Check out"
uses: actions/checkout@v2
- name: "Setup Go"
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: "Install CUE"
run: |
export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')"
export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz"
echo "Installing cue version $CUE_VERSION"
curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
- name: "Install SOPS"
run: |
# SOPS
sudo curl -L -o /usr/local/bin/sops https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux
sudo chmod +x /usr/local/bin/sops
- name: "Import Dagger private key"
env:
DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }}
run: |
mkdir -p ~/.config/dagger
echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt
- name: "Expose GitHub Runtime"
uses: crazy-max/ghaction-github-runtime@v1
- name: Test
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# TODO: https://github.com/dagger/dagger/pull/1341
# DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-integration"
# DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-integration"
run: |
env
make core-integration