Skip to content

Merge pull request #854 from controlplaneio-fluxcd/dependabot/go_modu… #665

Merge pull request #854 from controlplaneio-fluxcd/dependabot/go_modu…

Merge pull request #854 from controlplaneio-fluxcd/dependabot/go_modu… #665

Workflow file for this run

name: test
on:
pull_request:
push:
branches:
- 'main'
- 'release/**'
permissions:
contents: read # for actions/checkout to fetch code
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Disk Cleanup
uses: ./.github/actions/runner-cleanup
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Build frontend
run: make web-ci-install web-build
- name: Run linters
run: make lint
- name: Run frontend tests
run: make web-test
- name: Run controller tests
run: make test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
git --no-pager diff
echo 'run make test and commit changes'
exit 1
fi
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Disk Cleanup
uses: ./.github/actions/runner-cleanup
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Setup Kubernetes
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
version: v0.31.0
cluster_name: kind
- name: Build frontend
run: make web-ci-install web-build
- name: Run controller e2e tests
run: make test-e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
git --no-pager diff
echo 'run make test and commit changes'
exit 1
fi