Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions .github/workflows/_setup.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Setup Environment
description: Setup environment variables for the GitHub Actions workflow.

runs:
using: 'composite'
steps:
- name: Setup Node from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Enable corepack
shell: bash
run: corepack enable || true

- name: Detect package manager
id: pm
shell: bash
run: |
if [ -f pnpm-lock.yaml ]; then echo "pm=pnpm" >> $GITHUB_OUTPUT; exit 0; fi
if [ -f yarn.lock ]; then echo "pm=yarn" >> $GITHUB_OUTPUT; exit 0; fi
if [ -f package-lock.json ]; then echo "pm=npm" >> $GITHUB_OUTPUT; exit 0; fi
echo "pm=pnpm" >> $GITHUB_OUTPUT

- name: Install dependencies
shell: bash
run: |
PM="${{ steps.pm.outputs.pm }}"
if [ "$PM" = "pnpm" ]; then pnpm install --frozen-lockfile; fi
if [ "$PM" = "yarn" ]; then yarn install --frozen-lockfile; fi
if [ "$PM" = "npm" ]; then npm ci; fi

- name: Restore Cypress cache
uses: actions/cache@v4
with:
path: |
~/.cache/Cypress
node_modules/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/pnpm-lock.yaml', '**/yarn.lock', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-cypress-

- name: Cypress binary install
shell: bash
env:
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress
run: |
PM="${{ steps.pm.outputs.pm }}"
if [ "$PM" = "pnpm" ]; then pnpm exec cypress install || true; fi
if [ "$PM" = "yarn" ]; then yarn run -s cypress install || yarn dlx cypress install || true; fi
if [ "$PM" = "npm" ]; then npx --yes cypress install || true; fi
106 changes: 0 additions & 106 deletions .github/workflows/ci.yml

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Pull Request Checks

on:
pull_request: {}

permissions:
contents: read
actions: read
packages: read

jobs:
lint_commit:
name: Commit Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v4

- name: Setup environment
uses: ./.github/actions/setup-env

- name: Commitlint - Lint Commits
if: github.event_name == 'pull_request'
shell: bash
run: |
npx commitlint --from=origin/${{ github.base_ref }} --to=HEAD --config ./.commitlintrc.json

check:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v4

- name: Setup environment
uses: ./.github/actions/setup-env

- name: Nx Format - Check
run: npx nx format:check

- name: Nx Lint - Check
run: npx nx affected --target=lint --parallel=3 || echo "No affected projects for lint"

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v4

- name: Setup environment
uses: ./.github/actions/setup-env

- name: Run unit tests
run: npx nx affected --target=test --parallel=3 || echo "No affected projects for test"

- name: Run end-to-end tests
run: npx nx affected --target=e2e --parallel=3 || echo "No affected projects for e2e"

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v4

- name: Setup environment
uses: ./.github/actions/setup-env

- name: Run build
run: npx nx affected --target=build --parallel=3 || echo "No affected projects for build"
Loading