-
Notifications
You must be signed in to change notification settings - Fork 27
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
1 parent
6883497
commit 1ca16f9
Showing
3 changed files
with
105 additions
and
57 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,104 @@ | ||
name: Quality | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
quality: | ||
env: | ||
ZITADEL_IMAGE: ghcr.io/zitadel/zitadel:v2.63.4 | ||
POSTGRES_IMAGE: postgres:17.0-alpine3.19 | ||
|
||
name: Ensure Quality | ||
|
||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 30 | ||
|
||
permissions: | ||
contents: "read" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
command: | ||
- format --check | ||
- lint | ||
- test:unit | ||
- test:integration | ||
- test:acceptance | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Node.js 20.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/[email protected] | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install Dependencies | ||
run: CYPRESS_INSTALL_BINARY=0 pnpm install | ||
|
||
# We build already here so we can fail fast if the build fails | ||
- name: Run ZITADEL | ||
run: pnpm build | ||
if: ${{ matrix.command }} == "test:acceptance" | ||
|
||
- run: | | ||
echo "CYPRESS_VERSION=$(pnpm list -r | grep cypress | cut -d ' ' -f 2)" >> $GITHUB_ENV | ||
echo "PLAYWRIGHT_VERSION=$(npx playwright --version | cut -d ' ' -f 2)" >> $GITHUB_ENV | ||
- uses: actions/[email protected] | ||
name: Setup Cypress binary cache | ||
with: | ||
path: ~/.cache/Cypress | ||
key: ${{ runner.os }}-cypress-binary-${{ env.CYPRESS_VERSION }} | ||
restore-keys: | | ||
${{ runner.os }}-cypress-binary- | ||
if: ${{ matrix.command }} == "test:integration" | ||
|
||
- name: Install Cypress Browsers | ||
run: pnpm install | ||
if: ${{ matrix.command }} == "test:integration" | ||
|
||
- uses: actions/[email protected] | ||
name: Setup Playwright binary cache | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: ${{ runner.os }}-playwright-binary-${{ env.PLAYWRIGHT_VERSION }} | ||
restore-keys: | | ||
${{ runner.os }}-playwright-binary- | ||
if: ${{ matrix.command }} == "test:acceptance" | ||
|
||
- name: Install Playwright Browsers | ||
run: sudo pnpm exec playwright install --with-deps | ||
if: ${{ matrix.command }} == "test:acceptance" | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
if: ${{ matrix.command }} == "test:acceptance" | ||
|
||
- name: Run ZITADEL | ||
run: pnpm run-zitadel | ||
if: ${{ matrix.command }} == "test:acceptance" | ||
|
||
- name: Check | ||
id: check | ||
run: pnpm ${{ matrix.command }} |
This file was deleted.
Oops, something went wrong.
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