Skip to content

Update the last known envoy #1590

Update the last known envoy

Update the last known envoy #1590

Workflow file for this run

# `name` value will appear "as is" in the badge.
# See https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
# yamllint --format github .github/workflows/commit.yaml
---
name: "build"
on:
push: # We run tests on non-tagged pushes to master
tags: ''
branches: master
# ignore docs as they are built with Netlify. Ignore travis-related changes, too.
# func-e.wxs is used for the Windows Installer, so tested with msi.yaml
paths-ignore:
- '**/*.md'
- 'site/**'
- 'netlify.toml'
- '.travis.yml'
- 'packaging/msi/*'
- 'packaging/[email protected]'
- '.github/workflows/msi.yaml'
pull_request: # We also run tests on pull requests targeted at the master branch.
branches: master
paths-ignore:
- '**/*.md'
- 'site/**'
- 'netlify.toml'
- '.travis.yml'
- 'packaging/msi/*'
- 'packaging/[email protected]'
- '.github/workflows/msi.yaml'
# workflow_dispatch will let us manually trigger the workflow from GitHub actions dashboard.
# For example, you can try to build a branch without raising a pull request.
# See https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
defaults:
run: # use bash for all operating systems unless overridden
shell: bash
jobs:
test:
name: "Run unit tests (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
timeout-minutes: 90 # instead of 360 by default
strategy:
fail-fast: false # don't fail fast as sometimes failures are operating system specific
matrix: # use latest available versions and be consistent on all workflows!
os: [ubuntu-20.04, macos-12, windows-2022]
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Cache Go"
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
# go.mod for go release version, go.sum for modules used, and Tools.mk for 'go run' tools
key: test-${{ runner.os }}-go-${{ hashFiles('go.mod', 'go.sum', 'Tools.mk') }}
restore-keys: test-${{ runner.os }}-go-
- name: "Cache Envoy binaries"
uses: actions/cache@v3
with: # ~/.func-e/versions is cached so that we only re-download once: for TestFuncEInstall
path: ~/.func-e/versions
key: test-${{ runner.os }}-envoy-${{ hashFiles('internal/version/last_known_envoy.txt') }}
restore-keys: test-${{ runner.os }}-envoy-
- name: "Verify clean check-in"
run: make check
- name: "Run unit tests"
run: make test
- name: "Build the `func-e` binary"
run: make build
- name: "Run e2e tests using the `func-e` binary"
run: make e2e
- name: "Run e2e tests using the `func-e` binary (CentOS)"
if: runner.os == 'Linux'
run: docker run --rm -v $HOME/.func-e:$HOME/.func-e -v $PWD:/work ${CENTOS_IMAGE} -o ${E2E_FUNC_E_PATH}/func-e e2e
env: # CENTOS_IMAGE was built by internal-images.yaml; E2E_FUNC_E_PATH was built via `make build`
CENTOS_IMAGE: ghcr.io/tetratelabs/func-e-internal:centos-9
E2E_FUNC_E_PATH: build/func-e_linux_amd64
- name: "Generate coverage report" # only once (not per OS)
if: runner.os == 'Linux'
run: make coverage
- name: "Upload coverage report" # only on master push and only once (not per OS)
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && runner.os == 'Linux'
uses: codecov/codecov-action@v2
with:
file: ./coverage.txt