Skip to content

dns gateway: create manifest for every filter #1642

dns gateway: create manifest for every filter

dns gateway: create manifest for every filter #1642

Workflow file for this run

# Copyright Built On Envoy
# SPDX-License-Identifier: Apache-2.0
# The full text of the Apache license is available in the LICENSE file at
# the root of the repo.
name: CLI
on:
push:
branches:
- main
- release/**
pull_request:
branches:
- main
- release/**
env:
GOPROXY: https://proxy.golang.org
jobs:
changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dorny/paths-filter@v4
id: changes
with:
filters: |
code:
- '!**/*.md'
- '!examples/**'
- '!website/**'
- '!CODEOWNERS'
predicate-quantifier: every # Make the filters be AND-ed
token: "" # don't use github api
outputs:
code: ${{ steps.changes.outputs.code }}
check:
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cli
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make check
- run: make lint
build:
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cli
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make build
test:
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cli
env:
TEST_OPTS: -race
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make test-coverage
- uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: cli
e2e:
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cli
env:
# For PRs, skip the long running tests. For pushes to main or release branches, run all tests.
GO_TEST_ARGS: ${{ github.event_name == 'pull_request' && '-v -test.short' || '-v' }}
TEST_BOE_REQUEST_TIMEOUT: 10s
TEST_BOE_REGISTRY: ghcr.io/tetratelabs/built-on-envoy
TEST_BOE_REGISTRY_USERNAME: ${{ github.actor }}
TEST_BOE_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: dtolnay/rust-toolchain@stable
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make build_image
- run: make test-e2e
# Aggregate all the required jobs and make it easier to customize CI required jobs
cli-checks:
runs-on: ubuntu-latest
needs:
- check
- build
- test
- e2e
# We need this to run always to force-fail (and not skip) if any needed
# job has failed. Otherwise, a skipped job will not fail the workflow.
if: always()
steps:
- run: |
echo "CI checks completed"
[ "${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}" == "false" ] || exit 1