Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
kyrregjerstad committed May 11, 2024
1 parent 2837177 commit 980fc89
Showing 3 changed files with 79 additions and 28 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
permissions: write-all

name: CI

on:
push:
branches: [main, development]
paths-ignore:
- '**/*.md'
- '**/*.env.example'
- '.gitignore'
pull_request:
branches: [main, development]
paths-ignore:
- '**/*.md'
- '**/*.env.example'
- '.gitignore'

env:
CI: true

jobs:
setup:
runs-on: ubuntu-latest
env:
PLAYWRIGHT_USERNAME: ${{ secrets.PLAYWRIGHT_USERNAME }}
PLAYWRIGHT_PASSWORD: ${{ secrets.PLAYWRIGHT_PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v4.1.4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '18.18.0'

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.4
- run: pnpm run lint

build:
needs: lint
runs-on: ubuntu-latest
outputs:
build-artifact: build
steps:
- uses: actions/checkout@v4.1.4
- run: pnpm run build
- uses: actions/upload-artifact@v2
with:
name: .next
path: .next
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ export default defineConfig({

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// command: 'npm run build && npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },

0 comments on commit 980fc89

Please sign in to comment.