67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'CHANGELOG.md'
|
|
- 'README.md'
|
|
- 'MAINTAINERS'
|
|
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read # for actions/checkout to fetch code
|
|
|
|
jobs:
|
|
|
|
test-linux-amd64:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
|
with:
|
|
go-version: 1.20.x
|
|
cache-dependency-path: |
|
|
**/go.sum
|
|
**/go.mod
|
|
- name: Run tests
|
|
env:
|
|
SKIP_COSIGN_VERIFICATION: true
|
|
TEST_AZURE_ACCOUNT_NAME: ${{ secrets.TEST_AZURE_ACCOUNT_NAME }}
|
|
TEST_AZURE_ACCOUNT_KEY: ${{ secrets.TEST_AZURE_ACCOUNT_KEY }}
|
|
run: make test
|
|
|
|
test-linux-arm64:
|
|
# Hosted on Equinix
|
|
# Docs: https://github.com/fluxcd/flux2/tree/main/.github/runners
|
|
runs-on: [self-hosted, Linux, ARM64, equinix]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
|
with:
|
|
go-version: 1.20.x
|
|
cache-dependency-path: |
|
|
**/go.sum
|
|
**/go.mod
|
|
- name: Run tests
|
|
env:
|
|
SKIP_COSIGN_VERIFICATION: true
|
|
|
|
TEST_AZURE_ACCOUNT_NAME: ${{ secrets.TEST_AZURE_ACCOUNT_NAME }}
|
|
TEST_AZURE_ACCOUNT_KEY: ${{ secrets.TEST_AZURE_ACCOUNT_KEY }}
|
|
|
|
# Temporarily disabling -race for arm64 as our GitHub action
|
|
# runners don't seem to like it. The race detection was tested
|
|
# on both Apple M1 and Linux arm64 with successful results.
|
|
#
|
|
# We should reenable go test -race for arm64 runners once the
|
|
# current issue is resolved.
|
|
GO_TEST_ARGS: ''
|
|
run: make test
|