Skip to content

Commit

Permalink
ci: merge split workflows
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Mar 13, 2024
1 parent b39d1b2 commit 5adeb7c
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 84 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/main.yml

This file was deleted.

63 changes: 62 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,65 @@ on:
types: [opened, reopened]
jobs:
test:
uses: ./.github/workflows/test.yml
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test -- --run

e2e:
name: e2e
timeout-minutes: 10
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps

- name: Run Playwright tests
run: pnpm exec playwright test

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
73 changes: 70 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,79 @@
name: Release
on:
workflow_call:
push:
branches:
- main
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test -- --run

e2e:
name: e2e
timeout-minutes: 10
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps

- name: Run Playwright tests
run: pnpm exec playwright test

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

release:
name: release
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- test
- e2e
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
68 changes: 0 additions & 68 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 5adeb7c

Please sign in to comment.