Skip to content

Commit

Permalink
chore: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Nov 10, 2023
1 parent 7111f36 commit 2c16006
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Prepare

description: Checkout and install dependencies

runs:
using: composite
steps:
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install npm
shell: bash
run: npm install -g npm
- name: Install dependencies
shell: bash
run: npm ci
45 changes: 45 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Checks

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
uses: ./.github/actions/prepare
- name: Build
run: npm run build --workspaces

format:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
uses: ./.github/actions/prepare
- name: Lint
run: npm run format:check

lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
uses: ./.github/actions/prepare
- name: Lint
run: npm run lint

may-merge:
needs: ['format', 'lint', 'build']
runs-on: ubuntu-latest
steps:
- name: Cleared for merging
run: echo OK

0 comments on commit 2c16006

Please sign in to comment.