mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 10:35:20 +00:00
59 lines
1.5 KiB
YAML
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
|