Skip to content

Commit ee11657

Browse files
authored
chore: move e2e_required into github actions (#3595)
1 parent 503fcfc commit ee11657

File tree

3 files changed

+73
-54
lines changed

3 files changed

+73
-54
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: E2E Tests
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
jobs:
9+
config:
10+
env:
11+
TEST_CMD: gotestsum --junitfile e2e-tests.xml --format standard-verbose --
12+
UNIT_TAGS: unit
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
16+
with:
17+
config: ${{ vars.PERMISSIONS_CONFIG }}
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Install Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version-file: 'go.mod'
26+
- run: go install gotest.tools/gotestsum@latest
27+
- run: |
28+
set -Eeou pipefail
29+
mkdir "$XDG_CONFIG_HOME/atlascli"
30+
cat <<EOF > "$XDG_CONFIG_HOME/atlascli/config.toml"
31+
[e2e]
32+
org_id = "test_id"
33+
public_api_key = "test_pub"
34+
service = "cloud"
35+
EOF
36+
- run: make e2e-test
37+
env:
38+
E2E_TAGS: config
39+
- name: Test Summary
40+
id: test_summary
41+
uses: test-summary/[email protected]
42+
with:
43+
paths: e2e-tests.xml
44+
brew:
45+
env:
46+
TEST_CMD: gotestsum --junitfile e2e-tests.xml --format standard-verbose --
47+
UNIT_TAGS: unit
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
51+
with:
52+
config: ${{ vars.PERMISSIONS_CONFIG }}
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
- name: Install Go
58+
uses: actions/setup-go@v5
59+
with:
60+
go-version-file: 'go.mod'
61+
- run: go install gotest.tools/gotestsum@latest
62+
- run: make e2e-test
63+
env:
64+
E2E_TAGS: brew
65+
- name: Test Summary
66+
id: test_summary
67+
uses: test-summary/[email protected]
68+
with:
69+
paths: e2e-tests.xml

build/ci/evergreen.yml

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -538,49 +538,6 @@ tasks:
538538
tags: ["code_health"]
539539
commands:
540540
- func: "build"
541-
- name: config_e2e
542-
tags: ["e2e","required"]
543-
must_have_test_results: true
544-
depends_on:
545-
- name: compile
546-
variant: "code_health"
547-
patch_optional: true
548-
commands:
549-
- func: "install gotestsum"
550-
- command: shell.exec
551-
type: test
552-
params:
553-
<<: *go_options
554-
shell: bash
555-
script: |
556-
set -Eeou pipefail
557-
mkdir "$XDG_CONFIG_HOME/atlascli"
558-
cat <<EOF > "$XDG_CONFIG_HOME/atlascli/config.toml"
559-
[e2e]
560-
org_id = "5e429e7706822c6eac4d5971"
561-
public_api_key = "AAUMGJXA"
562-
service = "cloud"
563-
EOF
564-
- func: "e2e test"
565-
vars:
566-
MCLI_ORG_ID: ${atlas_org_id}
567-
MCLI_PROJECT_ID: ${atlas_project_id}
568-
MCLI_PRIVATE_API_KEY: ${atlas_private_api_key}
569-
MCLI_PUBLIC_API_KEY: ${atlas_public_api_key}
570-
MCLI_OPS_MANAGER_URL: ${mcli_ops_manager_url}
571-
MCLI_SERVICE: cloud
572-
E2E_TAGS: atlas,config
573-
- name: brew_e2e
574-
tags: ["e2e","required"]
575-
depends_on:
576-
- name: compile
577-
variant: "code_health"
578-
patch_optional: true
579-
commands:
580-
- func: "install gotestsum"
581-
- func: "e2e test"
582-
vars:
583-
E2E_TAGS: brew
584541
# If your e2e tests depend on a cluster running please consider setting it on its own task
585542
- name: atlas_generic_e2e
586543
tags: ["e2e","generic","atlas"]
@@ -1849,14 +1806,6 @@ buildvariants:
18491806
<<: *go_linux_version
18501807
tasks:
18511808
- name: ".e2e .generic"
1852-
- name: e2e_required
1853-
display_name: "E2E Tests Required"
1854-
run_on:
1855-
- rhel80-small
1856-
expansions:
1857-
<<: *go_linux_version
1858-
tasks:
1859-
- name: ".e2e .required"
18601809
- name: e2e_autogeneration
18611810
display_name: "E2E Autogenerated commands tests"
18621811
run_on:
@@ -2141,12 +2090,13 @@ github_pr_aliases:
21412090
task_tags: ["code_health"]
21422091
- variant: "e2e_generic"
21432092
task_tags: ["e2e", "generic"]
2144-
- variant: "e2e_required"
2145-
task_tags: ["e2e", "required"]
21462093
git_tag_aliases:
21472094
- git_tag: "atlascli/v*"
21482095
variant: "^release_atlascli"
21492096
task: ".*"
2097+
- git_tag: "atlascli/v*"
2098+
variant: "^copybara"
2099+
task: ".*"
21502100
github_checks_aliases:
21512101
- variant: ".*"
21522102
task: ".*"

cmd/atlas/atlas_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package main
1818

1919
import "testing"
2020

21-
func TestMain(t *testing.T) {
21+
func TestBuild(t *testing.T) {
2222
t.Setenv("DO_NOT_TRACK", "1")
2323
main()
2424
}

0 commit comments

Comments
 (0)