mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-23 16:27:35 +00:00
abacb6c5aa
* test: fix e2e against console dev server * chore: get rid of network_mode host * explain e2e commands * chore: fix pipelines * fix e2e paths * fix dockerized e2e * chore: map cypress run service ports * simplify localhost * access db via compose service * access db via compose service * fix npm run open:angular and e2e:angular * docs: add empty line * chore: remove unused file * docs: update contrib --------- Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
name: ZITADEL PR
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'guides/**'
|
|
- '**.md'
|
|
- 'release-channels.yaml'
|
|
|
|
jobs:
|
|
Build-ZITADEL:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
- name: Source checkout
|
|
uses: actions/checkout@v3
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
driver: docker
|
|
install: true
|
|
- name: Install GoReleaser
|
|
uses: goreleaser/goreleaser-action@v3
|
|
with:
|
|
install-only: true
|
|
version: v1.10.3
|
|
- name: Build and Unit Test
|
|
run: GOOS="linux" GOARCH="amd64" goreleaser build --id prod --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
|
|
- name: linting
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.50.1
|
|
only-new-issues: true
|
|
skip-pkg-cache: true
|
|
- name: Publish go coverage
|
|
uses: codecov/codecov-action@v3.1.0
|
|
with:
|
|
file: .artifacts/codecov/profile.cov
|
|
name: go-codecov
|
|
# As goreleaser doesn't build a dockerfile in snapshot mode, we have to build it here
|
|
- name: Build Docker Image
|
|
run: docker build -t zitadel:pr --file build/Dockerfile .artifacts/zitadel
|
|
- name: Run E2E Tests
|
|
run: docker compose run --service-ports e2e --browser chrome
|
|
working-directory: e2e/config/host.docker.internal
|
|
env:
|
|
ZITADEL_IMAGE: zitadel:pr
|
|
- name: Save ZITADEL Logs
|
|
if: always()
|
|
run: docker compose logs zitadel > ../../../.artifacts/e2e-compose-zitadel.log
|
|
working-directory: e2e/config/host.docker.internal
|
|
- name: Save Prepare Logs
|
|
if: always()
|
|
run: docker compose logs prepare > ../../../.artifacts/e2e-compose-prepare.log
|
|
working-directory: e2e/config/host.docker.internal
|
|
- name: Archive Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: pull-request-tests
|
|
path: |
|
|
e2e/cypress/results
|
|
e2e/cypress/videos
|
|
e2e/cypress/screenshots
|
|
.artifacts/e2e-compose-zitadel.log
|
|
.artifacts/e2e-compose-prepare.log
|
|
retention-days: 30
|