E2E #3977
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout latest code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
cache: false | |
# Note that we deliberately don’t restore GOCACHE. | |
# That is, we must not cache e2e test results. | |
- name: Get Go environment | |
id: go-env | |
run: echo "::set-output name=modcache::$(go env GOMODCACHE)" | |
- name: Set up cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-env.outputs.modcache }} | |
key: e2e-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }} | |
restore-keys: | | |
e2e-${{ runner.os }}-go- | |
- name: Install latest mtg proxy | |
run: go install -v github.com/9seconds/mtg/v2@latest | |
# Run all tests that start with "TestExternalE2E". | |
- name: Run tests | |
run: go test -v -run ^TestExternalE2E ./... | |
env: | |
GOTD_TEST_EXTERNAL: 1 | |
GOTD_MTPROXY_ADDR: "127.0.0.1:3128" |