checkout/.github/workflows/pr.yaml
2023-08-16 18:48:04 +03:00

59 lines
1.5 KiB
YAML

name: PR
on: [pull_request]
jobs:
init:
name: Init
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Init
uses: ./.github/actions/init
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: ./*
key: ${{ github.sha }}
lint-format-check:
name: Lint and prettier check
runs-on: ubuntu-latest
needs: [init]
steps:
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: ./*
key: ${{ github.sha }}
- name: Lint
run: npm run lint
- name: Prettier
run: npm run prettier
test:
name: Test
runs-on: ubuntu-latest
needs: [init]
steps:
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: ./*
key: ${{ github.sha }}
- name: Test
run: npm run test
build:
name: Build
runs-on: ubuntu-latest
needs: [init]
steps:
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: ./*
key: ${{ github.sha }}
- name: Build
run: npm run build