Skip to content

Commit

Permalink
feat: add check pr github action
Browse files Browse the repository at this point in the history
Signed-off-by: ryanwolhuter <dev@ryanwolhuter.com>
  • Loading branch information
ryanwolhuter committed Jan 18, 2024
1 parent a03799d commit eca9c8b
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Check PR

on:
push:
branches: ['main']
pull_request:
branches: ['main']
types: [opened, synchronize]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Lint
run: yarn lint

- name: Check types
run: yarn check-types

build:
name: Build
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

0 comments on commit eca9c8b

Please sign in to comment.