-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
145 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Extensions Compatibility Tests | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # runs at midnight every day | ||
# TODO: DELETE THIS!!!! JUST FOR TESTING PURPOSES! | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - master | ||
# - 'release-*' | ||
# pull_request: | ||
# branches: | ||
# - master | ||
# - 'release-*' | ||
# workflow_dispatch: | ||
# inputs: | ||
# environment: | ||
# description: 'Environment to run tests against' | ||
# type: environment | ||
# required: true | ||
|
||
env: | ||
TEST_USERNAME: admin | ||
TEST_PASSWORD: password | ||
CATTLE_BOOTSTRAP_PASSWORD: password | ||
TEST_BASE_URL: https://127.0.0.1:8005 | ||
API: https://127.0.0.1 | ||
TEST_PROJECT_ID: rancher-dashboard | ||
CYPRESS_API_URL: http://139.59.134.103:1234/ | ||
TEST_RUN_ID: ${{github.run_number}}-${{github.run_attempt}}-Extensions-Compatibility-Tests | ||
# Build the dashboard to use in tests. When set to false it will grab `latest` from CDN (useful for running e2e tests quickly) | ||
BUILD_DASHBOARD: true | ||
|
||
E2E_BUILD_DIST_NAME: dist | ||
E2E_BUILD_DIST_DIR: dist | ||
E2E_BUILD_DIST_EMBER_NAME: dist_ember | ||
E2E_BUILD_DIST_EMBER_DIR: dist_ember | ||
|
||
jobs: | ||
e2e-test: | ||
if: "!contains( github.event.pull_request.labels.*.name, 'ci/skip-e2e')" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
role: [ | ||
{ username: 'admin', tag: '@adminUser' }, | ||
# { username: 'standard_user', tag: '@standardUser' } | ||
] | ||
features: [ | ||
['@elemental'], | ||
['@kubewarden'], | ||
['@neuvector'] | ||
] | ||
rancherEnv: [ | ||
['v2.7-head'], | ||
['v2.8-head'], | ||
['v2.9-head'], | ||
] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup env | ||
uses: ./.github/actions/setup | ||
# - name: Download e2e build | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: ${{ env.E2E_BUILD_DIST_NAME }} | ||
# path: ${{ env.E2E_BUILD_DIST_DIR }} | ||
# - name: Download e2e build ember | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: ${{ env.E2E_BUILD_DIST_EMBER_NAME }} | ||
# path: ${{ env.E2E_BUILD_DIST_EMBER_DIR }} | ||
|
||
# this is where docker is set up with the enviroment... | ||
- name: Run Rancher | ||
run: yarn e2e:docker # runs scripts/e2e-docker-start | ||
env: | ||
RANCHER-VERSION-E2E: ${{ matrix.rancherEnv[0] }} | ||
|
||
## this is just setting up rancher and user... | ||
- name: Setup Rancher and user | ||
run: | | ||
yarn e2e:prod | ||
env: | ||
GREP_TAGS: ${{ matrix.role.tag }}Setup+${{ matrix.features[0] }} --@jenkins ${{ matrix.role.tag }}Setup+${{ matrix.features[1] || matrix.features[0] }} --@jenkins | ||
TEST_USERNAME: ${{ matrix.role.username }} | ||
TEST_ONLY: setup | ||
|
||
# This is the actual test runs!!!! | ||
- name: Run user tests | ||
run: | | ||
yarn e2e:prod | ||
[ "$BUILD_DASHBOARD" != "false" ] || exit 0 | ||
env: | ||
TEST_SKIP: setup | ||
GREP_TAGS: ${{ matrix.role.tag }}+${{ matrix.features[0] }} --@jenkins ${{ matrix.role.tag }}+${{ matrix.features[1] || matrix.features[0] }} --@jenkins | ||
TEST_USERNAME: ${{ matrix.role.username }} | ||
|
||
- name: Upload screenshots | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() }} | ||
with: | ||
name: ${{github.run_number}}-${{github.run_attempt}}-screenshots-${{ matrix.role.tag }}+${{ matrix.features[0] }} | ||
path: cypress/screenshots |
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
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