fix: merge github workflows in one file, trying github deploy status triger, drink tea and eat cookies
This commit is contained in:
parent
a7e1a1763c
commit
35e282fb18
|
@ -35,3 +35,33 @@ jobs:
|
||||||
run: npm run e2e:tests:ci
|
run: npm run e2e:tests:ci
|
||||||
env:
|
env:
|
||||||
BASE_URL: https://testing3.discours.io
|
BASE_URL: https://testing3.discours.io
|
||||||
|
|
||||||
|
|
||||||
|
name: "deploy"
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm i
|
||||||
|
|
||||||
|
- name: Install CI checks
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Check types
|
||||||
|
run: npm run typecheck
|
||||||
|
|
||||||
|
- name: Lint with Biome
|
||||||
|
run: npx @biomejs/biome check src/.
|
||||||
|
|
||||||
|
- name: Lint styles
|
||||||
|
run: npx stylelint **/*.{scss,css}
|
||||||
|
|
||||||
|
- name: Test production build
|
||||||
|
run: npm run build
|
42
.github/workflows/node-ci.yml
vendored
42
.github/workflows/node-ci.yml
vendored
|
@ -1,28 +1,50 @@
|
||||||
name: "deploy"
|
name: "CI and E2E Tests"
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
deployment_status:
|
||||||
|
types: [success]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
ci:
|
||||||
|
if: github.event_name == 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm i
|
run: npm i
|
||||||
|
|
||||||
- name: Install CI checks
|
- name: Install CI checks
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Check types
|
- name: Check types
|
||||||
run: npm run typecheck
|
run: npm run typecheck
|
||||||
|
|
||||||
- name: Lint with Biome
|
- name: Lint with Biome
|
||||||
run: npx @biomejs/biome check src/.
|
run: npx @biomejs/biome check src/.
|
||||||
|
|
||||||
- name: Lint styles
|
- name: Lint styles
|
||||||
run: npx stylelint **/*.{scss,css}
|
run: npx stylelint **/*.{scss,css}
|
||||||
|
|
||||||
- name: Test production build
|
- name: Test production build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
e2e_tests:
|
||||||
|
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Wait for deployment to be live
|
||||||
|
run: |
|
||||||
|
echo "Waiting for Vercel deployment to be live..."
|
||||||
|
until curl -sSf https://testing3.discours.io > /dev/null; do
|
||||||
|
printf '.'
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
- name: Install Playwright and dependencies
|
||||||
|
run: npm run e2e:install
|
||||||
|
- name: Run Playwright tests
|
||||||
|
run: npm run e2e:tests:ci
|
||||||
|
env:
|
||||||
|
BASE_URL: https://testing3.discours.io
|
Loading…
Reference in New Issue
Block a user