Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Run unit tests separately from e2e tests #867

Closed
wants to merge 14 commits into from
10 changes: 4 additions & 6 deletions .github/workflows/automated-tests.yml
faddat marked this conversation as resolved.
Show resolved Hide resolved
@@ -1,4 +1,4 @@
name: Automated Tests
name: E2E Tests
on:
push:
branches:
Expand All @@ -9,7 +9,7 @@ on:
- main
- release/v*
jobs:
Automated_Tests:
E2E_Tests:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -23,8 +23,6 @@ jobs:
with:
go-version: "1.19" # The Go version to download (if necessary) and use.

- name: Unit, integration and difference tests
run: go test ./...

- name: E2E tests
run: make test-e2e-short
run: go run ./tests/e2e/... --happy-path-only

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: go run ./tests/e2e/... --happy-path-only
run: make test-e2e-short

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh -- actually I'd meant to add --verbose

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use make test-e2e-short. Developers can always run the tests locally with --verbose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we can't prove outcomes using CI, so that there's no debate, in the way that you recommend.

CI is a neutral and clearly defined build environment that can be used as proof of issues.

Copy link
Contributor Author

@faddat faddat May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want proof, there is no reason whatsoever not to capture the logs.

15 changes: 15 additions & 0 deletions .github/workflows/go-tests.yml
faddat marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1,15 @@
on: [push, pull_request]
name: Test
faddat marked this conversation as resolved.
Show resolved Hide resolved
jobs:
test:
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
os: [ubuntu-latest, macos-latest, windows-latest]
faddat marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test ./...