build(deps): bump actions/download-artifact from 4.1.2 to 4.1.7 #473
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: Integration tests | |
on: | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- '**/*.md' | |
push: | |
paths-ignore: | |
- '*.md' | |
- '**/*.md' | |
branches: | |
- main | |
permissions: | |
contents: read | |
env: | |
GH_ANNOTATION: true | |
jobs: | |
docker_build: | |
runs-on: ubuntu-20.04 | |
name: Build SMI Extension | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Set environment variables from scripts | |
run: | | |
. bin/_tag.sh | |
echo "TAG=$(CI_FORCE_CLEAN=1 bin/root-tag)" >> $GITHUB_ENV | |
echo "DOCKER_BUILDKIT_CACHE=${{ runner.temp }}/.buildx-cache" >> $GITHUB_ENV | |
- name: Cache docker layers | |
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 | |
with: | |
path: ${{ env.DOCKER_BUILDKIT_CACHE }} | |
key: ${{ runner.os }}-buildx-smi-${{ env.TAG }} | |
restore-keys: | | |
${{ runner.os }}-buildx-smi- | |
- name: Build SMI docker image | |
run: | | |
docker buildx create --driver docker-container --use | |
bin/docker-build | |
- name: Build SMI CLI | |
run: bin/build-cli-bin | |
- name: Create artifact with CLI and image archives | |
env: | |
ARCHIVES: /home/runner/archives | |
run: | | |
mkdir -p $ARCHIVES | |
docker save "cr.l5d.io/linkerd/smi-adaptor:$TAG" > $ARCHIVES/smi-adaptor.tar | |
cp target/cli/linkerd-smi-linux-amd64 $ARCHIVES | |
- name: Upload artifact | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 | |
with: | |
name: build-archives | |
path: /home/runner/archives | |
integration_tests: | |
needs: [docker_build] | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
name: Integration tests | |
strategy: | |
matrix: | |
test: [helm, cli] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Set environment variables from scripts | |
run: | | |
echo "TAG=$(CI_FORCE_CLEAN=1 bin/root-tag)" >> $GITHUB_ENV | |
- name: Try to load cached Go modules | |
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Download image archives | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e | |
with: | |
name: build-archives | |
path: build-archives | |
- name: Create k8s Kind Cluster | |
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 | |
with: | |
cluster_name: kind | |
- name: Load the SMI extension CLI and Images | |
run: | | |
mkdir -p $HOME/.linkerd2/bin | |
echo "$HOME/.linkerd2/bin" >> $GITHUB_PATH | |
mv build-archives/linkerd-smi-linux-amd64 "$HOME/.linkerd2/bin/linkerd-smi" | |
chmod +x $HOME/.linkerd2/bin/linkerd-smi | |
# load image into the cluster | |
kind load image-archive build-archives/smi-adaptor.tar | |
- name: Install the Linkerd CLI | |
run : | | |
curl -sL https://run.linkerd.io/install-edge | sh | |
- name: Run Helm Integration Tests | |
if: ${{ matrix.test == 'helm' }} | |
run: | | |
projectdir=$(pwd) | |
GO111MODULE=on go test --failfast --mod=readonly "./test" --linkerd="$HOME/.linkerd2/bin/linkerd" --helm-path="$projectdir/bin/helm" --smi-helm-chart="$projectdir/charts/linkerd-smi" --smi-helm-version="$TAG" --integration-tests | |
- name: Run CLI Integration Tests | |
if: ${{ matrix.test == 'cli' }} | |
run: | | |
GO111MODULE=on go test --failfast --mod=readonly "./test" --linkerd="$HOME/.linkerd2/bin/linkerd" --integration-tests |