Skip to content

Commit

Permalink
ci: install on every step instead of caching
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Dec 23, 2024
1 parent 0f2d1ae commit 02d383c
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
workflow_dispatch:

jobs:
install:
name: Install & Cache Dependencies
code_style:
name: Prettier Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,73 +18,77 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"

cache: pnpm
- name: Install dependencies
run: pnpm install

code_style:
name: Prettier Check
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Prettier Check
run: pnpm run prettier:check

type_check:
name: Type Check
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Type Check
run: pnpm run typecheck

lint:
name: Lint
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm run lint

build_backend:
name: Build Backend
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build Backend
run: pnpm --filter backend build

build_frontend:
name: Build Frontend
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build Frontend
env:
NEXT_PUBLIC_API_URL: https://staging.api.boklisten.no/
Expand All @@ -95,12 +99,16 @@ jobs:
test_backend:
name: Test Backend
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Test Backend
run: pnpm --filter backend test

0 comments on commit 02d383c

Please sign in to comment.