zitadel/.github/workflows/e2e.yml

62 lines
2.0 KiB
YAML
Raw Normal View History

ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
name: "ZITADEL e2e Tests"
on:
workflow_run:
workflows: [ZITADEL Release]
types:
- completed
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
workflow_dispatch:
inputs:
releaseversion:
description: 'Release version to test'
required: true
default: 'latest'
jobs:
test:
strategy:
matrix:
browser: [firefox, chrome]
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
runs-on: ubuntu-20.04
env:
ZITADEL_IMAGE_REGISTRY: 'ghcr.io/zitadel/zitadel'
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set TAG env manual trigger
if: github.event_name == 'workflow_dispatch'
run: echo "ZITADEL_IMAGE=${ZITADEL_IMAGE_REGISTRY}:${{ github.event.inputs.releaseversion }}" >> $GITHUB_ENV
- name: Set TAG env on ZITADEL release
if: github.event_name == 'workflow_run'
run: echo "ZITADEL_IMAGE=${ZITADEL_IMAGE_REGISTRY}:${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver: docker
install: true
- name: Test ${{ matrix.browser }}
run: docker compose run e2e --browser ${{ matrix.browser }}
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
working-directory: e2e
- name: Ensure Artifacts Directory Exists
run: mdkir -p ./.artifacts
- name: Save ZITADEL Logs
if: always()
run: docker compose logs zitadel > ../.artifacts/e2e-compose-zitadel.log
working-directory: e2e
- name: Save Prepare Logs
if: always()
run: docker compose logs prepare > ../.artifacts/e2e-compose-prepare.log
working-directory: e2e
- name: Archive production tests ${{ matrix.browser }}
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
if: always()
uses: actions/upload-artifact@v2
with:
name: production-tests-${{ matrix.browser }}
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
path: |
e2e/cypress/results
e2e/cypress/videos
e2e/cypress/screenshots
.artifacts/e2e-compose-zitadel.log
.artifacts/e2e-compose-prepare.log
ci(e2e): Run Tests in Pipelines (#3903) * cy10 changes * test: setup local e2e env * test(e2e): migrate e2e setup * add more config * make e2e setup work * align variables * fix config * skip mfa * set user register to false * read ids from database if not provided * don't read ids withing env file * fix escaping in id queries * fix project root * export projectRoot path * export projectRoot * add e2e-setup.sh * specify GOOS and GOARCH for dockerfile compatible binary * add org default redirect uri * correctly initialize org policy * await ids * fix awaiting ids * fix cypress configuration * fix some tests * initial compose setup * fix working directory * fix references * make tests less flaky * run go tests * compose works until e2e-setup incl * pass created e2e sa key * make cypress run * derive e2e orgs domain from baseurl * use host from baseurl for setup ctx * move defaults.yaml back to cmd pkg * just create org owner * Don't render element if no roles are passed * use map instead of switchMap * fix e2e tests * added testdata for e3e * zipped dump * removed dumpDir * cypress workflow with compose * quote name * cleanup vars * eliminate need for e2e setup * compose has no builds anymore * use compose run and zitadel nw * test e2e on pr (#4114) * test e2e on pr * install goreleaser * install npm dev dependencies * run cypress wf * dynamic release version * skip flaky user tests * skip flaky permissions test * cache docker layers in pipeline * Update .github/workflows/cypress.yml Co-authored-by: Florian Forster <florian@caos.ch> * align goreleaser version * get rid of install.sh * remove cypress-terminal-report * Revert "remove cypress-terminal-report" This reverts commit 254b5a1f87be71c64c1289b12fc1bf23a401ea64. * just one npm e2e:build command * cache npm dependencies * install node modules using docker * dedicated e2e context * fix syntax * don't copy node modules from goreleaser * add npm-copy target * add tsconfig.json * remove docker caching * deleted unneeded shellscript * naming and cleanup Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Christian Jakob <christian@caos.ch> * cleanup Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Christian Jakob <christian@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch>
2022-08-05 18:00:46 +00:00
retention-days: 30