Skip to content

chore(ci): update workflows #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
27 changes: 15 additions & 12 deletions .github/workflows/branch-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run format
run: |
yarn
yarn format
run: npm run format

test:
timeout-minutes: 15
Expand All @@ -39,12 +40,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run test
run: |
yarn
yarn test --passWithNoTests
run: npm run test --passWithNoTests

build:
timeout-minutes: 15
Expand All @@ -58,9 +60,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run build
run: |
yarn
yarn build
run: npm run build
52 changes: 28 additions & 24 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run format
run: |
yarn install
yarn format
run: npm run format

test:
timeout-minutes: 15
Expand All @@ -36,12 +37,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run test
run: |
yarn install
yarn test --passWithNoTests
run: npm run test --passWithNoTests

build:
timeout-minutes: 15
Expand All @@ -55,20 +57,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: "npm"

- uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.next/cache
key: next-build-cache-${{ hashFiles('./yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
key:
next-build-cache-${{ hashFiles('./package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
next-build-cache-${{ hashFiles('./yarn.lock') }}-
next-build-cache-${{ hashFiles('./package-lock.json') }}-

- name: Install dependencies
run: npm ci

- name: Run build
run: |
yarn
yarn build
run: npm run build

e2e:
timeout-minutes: 15
Expand All @@ -90,35 +94,35 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/frontend/.next/cache
key:
next-build-cache-${{ hashFiles('./frontend/yarn.lock') }}-${{ hashFiles('./frontend/**.[jt]s',
'./frontend/**.[jt]sx') }}
next-build-cache-${{ hashFiles('./frontend/package-lock.json') }}-${{
hashFiles('./frontend/**.[jt]s', './frontend/**.[jt]sx') }}
restore-keys: |
next-build-cache-${{ hashFiles('./frontend/yarn.lock') }}-
next-build-cache-${{ hashFiles('./frontend/package-lock.json') }}-

- name: Install
run: |
cd ./backend
yarn
yarn compas generate application --skip-lint
npm install
npx compas generate application --skip-lint
cd ../frontend
yarn
yarn playwright install --with-deps chromium
npm install
npx playwright install --with-deps chromium

- name: Run e2e
env:
TENANT_ORIGIN: "scaffold.acc.lightbase.nl"
TENANT_API_URL: "http://localhost:3001"
run: |
cd ./frontend
yarn test:e2e:ci
npm run test:e2e:ci

- name: Upload test results
if: always()
Expand Down