ci: ignore some changes for tests (#4152)

* ci: ignore some changes for tests

* is check ok?

* match all .md files

* is check ok?

* is check ok?

* avoid skipped but required checks

* document test-docs.yml workflow

* cleanup check tests

* trigger check

* revert readme changes

* respect changes in /tools/ for tests

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Elio Bischof
2022-08-11 10:06:25 +02:00
committed by GitHub
parent 7c49f03d19
commit 4014c017fa
2 changed files with 24 additions and 0 deletions

54
.github/workflows/test-code.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: ZITADEL PR
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'guides/**'
- '**.md'
jobs:
Test:
runs-on: ubuntu-20.04
env:
DOCKER_BUILDKIT: 1
steps:
- name: Source checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver: docker
install: true
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
install-only: true
version: v1.8.3
- name: Build and Unit Test
run: GOOS="linux" GOARCH="amd64" goreleaser build --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
- 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 e2e
working-directory: e2e
env:
ZITADEL_IMAGE: zitadel:pr
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: pull-request-tests
path: |
e2e/cypress/results
e2e/cypress/videos
e2e/cypress/screenshots
retention-days: 30