Skip to content

Commit

Permalink
#43 Split build and test jobs and tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
danielemery committed Sep 22, 2023
1 parent 10c9478 commit 8a91e1a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 42 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and test

on:
push:
branches: ['main']
pull_request:
branches: ['main']

permissions:
contents: read

env:
NODE_VERSION: 18.17.1

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install packages
run: npm ci

- name: Build
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
dist
prisma
Dockerfile
.dockerignore
package*.json
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install packages
run: npm ci

- name: Lint
run: npm run lint

- name: Run unit tests
run: npm t
42 changes: 0 additions & 42 deletions .github/workflows/test.yaml

This file was deleted.

0 comments on commit 8a91e1a

Please sign in to comment.