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

Run acceptance tests in both github and gitlab #1245

Merged
merged 46 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c19f15d
initial commit
Dec 17, 2021
36d3733
fix lint issue
Dec 17, 2021
d608061
fix lint issue
Dec 17, 2021
f6dcd46
try to run tests
Dec 17, 2021
fa7ff65
change input format
Dec 17, 2021
56ee979
add quote marks
Dec 17, 2021
f46f5c7
remove quotes
Dec 17, 2021
1457bd5
set if-else for gitlab
Dec 17, 2021
ecbd28a
set gitlab env
Dec 17, 2021
f253b01
refactor if condition
Dec 17, 2021
dc17471
reset env
Dec 17, 2021
76c302c
refactor env
Dec 18, 2021
553f4a0
separate envs
Dec 18, 2021
a42f095
fix lint issue
Dec 18, 2021
4c7221e
separate test runs
Dec 18, 2021
056e26f
remove if always
Dec 18, 2021
da3aeb9
add shell
Dec 18, 2021
f57b5cf
go back to previous change
Dec 18, 2021
8af887c
change syntax
Dec 18, 2021
10c6cff
change syntax
Dec 18, 2021
b14e4f5
remove quotes
Dec 19, 2021
ff577e8
try include keyword
Dec 20, 2021
76d6ce8
use export
Dec 20, 2021
77aa4dc
correct syntax for test runs
Dec 20, 2021
e666728
experiment on skip tag
Dec 20, 2021
c7af2c0
Merge branch 'main' into use-git-provider-as-variable
Dec 20, 2021
8f37394
remove matrix for all jobs but one
Dec 21, 2021
e476d9e
remove if else condition
Dec 21, 2021
6aa9945
refactor add test
Dec 21, 2021
b63c3ad
remove tag
Dec 21, 2021
e2e667b
empty commit
Dec 21, 2021
1bdc436
use if statement to prevent failure
Dec 21, 2021
137fe38
fix syntax
Dec 21, 2021
8493dd4
set env for a single job
Dec 21, 2021
45741df
use single quotes
Dec 21, 2021
147715b
refactor if else
Dec 21, 2021
bc99003
revert changes for gitlab tests
Dec 22, 2021
8ee4f14
use if else again
Dec 22, 2021
2055f56
fix remaining errors
Dec 22, 2021
d87b7a3
empty commit
Dec 22, 2021
9561f43
making changes according to comments
Dec 22, 2021
b321df7
Attempt to fix CI by removing include in smoke-tests-long job (#1260)
josecordaz Dec 23, 2021
eaa31f3
updated test files and readme
Dec 23, 2021
4398852
Merge branch 'main' into use-git-provider-as-variable
Dec 23, 2021
cbd4003
try to fix smoke test job
Dec 23, 2021
ddf1d48
remove problem syntax
Dec 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/actions/run-acceptance-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ inputs:
gitlab-token:
description: "Token for accessing GitLab"
required: true
git-provider:
description: "Value for running tests either on GitHub or GitLab"
required: false
artifacts-base-dir:
description: "Directory for test artifacts"
required: true
Expand Down Expand Up @@ -71,7 +74,7 @@ runs:
run: |
chmod +x bin/gitops
ls -la bin
- name: Download dependecies
- name: Download dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch

shell: bash
run: |
make dependencies
Expand Down Expand Up @@ -99,13 +102,17 @@ runs:
GITLAB_SUBGROUP: weave-gitops-sub
GITLAB_TOKEN: ${{ inputs.gitlab-token }}
GITLAB_KEY: ${{ inputs.gitlab-key }}
GIT_PROVIDER: ${{ inputs.git-provider }}
ARTIFACTS_BASE_DIR: ${{ inputs.artifacts-base-dir }}
run: |
export PATH=${PATH}:`go env GOPATH`/bin
export WEGO_BIN_PATH=$(pwd)/bin/gitops
export CLUSTER_PROVIDER=kubectl
go get github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
if [ "${{ github.job }}" == "smoke-tests-long" ]; then
export GIT_PROVIDER=${{ matrix.GIT_PROVIDER }}
rokshana-b marked this conversation as resolved.
Show resolved Hide resolved
fi
ginkgo ${{ inputs.focus-or-skip }} --randomizeSuites --reportFile=${{ env.ARTIFACTS_BASE_DIR }}/${{ inputs.result-prefix }}acceptance-test-results.xml -v ./test/acceptance/test/...
if: always()
- name: Store acceptance test results
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ jobs:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 60
strategy:
matrix:
git-provider: [github, gitlab]
include:
- git-provider: github
GIT_PROVIDER: github
rokshana-b marked this conversation as resolved.
Show resolved Hide resolved
- git-provider: gitlab
GIT_PROVIDER: gitlab
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/run-acceptance-test
Expand All @@ -149,6 +157,7 @@ jobs:
gitlab-key: ${{ secrets.GITLAB_KEY }}
gitlab-token: ${{ secrets.GITLAB_TOKEN }}
gitlab-org: ${{ secrets.GITLAB_ORG }}
git-provider: $${{ matrix.git-provider }}
artifacts-base-dir: "/tmp/gitops-test"

acceptance-tests-0:
Expand Down