Skip to content

Commit

Permalink
Fix GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jkettmann committed Sep 27, 2024
1 parent 9e19f6d commit 8a8b326
Showing 1 changed file with 13 additions and 33 deletions.
46 changes: 13 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,14 @@ on:
branches: [main]

jobs:
install:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
- run: npm ci

lint:
runs-on: ubuntu-latest
needs: install

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm run lint:code
Expand All @@ -36,40 +24,32 @@ jobs:

build:
runs-on: ubuntu-latest
needs: install
env:
NEXT_PUBLIC_API_BASE_URL: ${{vars.NEXT_PUBLIC_API_BASE_URL}}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm run build
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: nextjs-build
path: .next/

e2e:
runs-on: ubuntu-latest
needs: build
env:
NEXT_PUBLIC_API_BASE_URL: ${{vars.NEXT_PUBLIC_API_BASE_URL}}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "npm"
- run: npm ci
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: nextjs-build
path: .next/
- name: Build app
run: npm run build
- name: Cypress run
uses: cypress-io/github-action@v4
with:
Expand Down

0 comments on commit 8a8b326

Please sign in to comment.