Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Bump actions/cache from 3 to 4 #522

Bump actions/cache from 3 to 4

Bump actions/cache from 3 to 4 #522

Workflow file for this run

name: Build Source
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- 'docs/**'
- 'helm/**'
- 'CHART_VERSION'
- '*.sh'
tags-ignore:
- "*"
pull_request:
branches:
- main
paths-ignore:
- '*.md'
- 'docs/**'
- 'helm/**'
- 'CHART_VERSION'
- '*.sh'
workflow_dispatch:
env:
GO_VERSION: "1.20"
KIND_VERSION: "v0.11.1"
jobs:
verify-code:
name: Verify code
runs-on: ubuntu-20.04
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Cached Go dependencies
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Verify Go code
uses: golangci/[email protected]
with:
args: --verbose
version: latest
skip-pkg-cache: true
skip-build-cache: true
- name: Vendor Go modules
run: go mod vendor
tests:
name: Run tests
needs:
- verify-code
runs-on: ubuntu-20.04
environment: "GITHUB CI"
timeout-minutes: 15
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Kubernetes cluster (KIND)
uses: helm/[email protected]
with:
version: ${{ env.KIND_VERSION }}
cluster_name: kind-test
- name: Test connection to Kubernetes cluster
run: |
kubectl cluster-info
kubectl wait --for=condition=Ready nodes --all --timeout=300s
kubectl describe node
- name: Run tests
run: |
make all-tests
env:
KUBECONFIG: /home/runner/.kube/config
ARDOQ_BASEURI: ${{ secrets.ARDOQ_BASEURI }}
ARDOQ_ORG: ${{ secrets.ARDOQ_ORG }}
ARDOQ_WORKSPACE_ID: ${{ secrets.ARDOQ_WORKSPACE_ID }}
ARDOQ_APIKEY: ${{ secrets.ARDOQ_APIKEY }}
ARDOQ_CLUSTER: ${{ secrets.ARDOQ_CLUSTER }}
release-snapshot:
name: Release unversioned snapshot
needs:
- tests
runs-on: ubuntu-20.04
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Release snapshot
uses: goreleaser/goreleaser-action@v5
with:
version: v1.1.0
args: release --snapshot --skip-publish --rm-dist