0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-13 21:30:30 -05:00
logto/.github/workflows/ui-main.yml

47 lines
1 KiB
YAML
Raw Normal View History

2021-07-26 01:11:38 +08:00
name: UI
2021-07-11 22:28:35 +08:00
on:
push:
branches: [ master ]
2021-08-10 23:19:34 +08:00
paths: [ 'packages/ui/**', 'packages/phrases/**' ]
2021-07-11 22:28:35 +08:00
pull_request:
branches: [ master ]
2021-08-10 23:19:34 +08:00
paths: [ 'packages/ui/**', 'packages/phrases/**' ]
2021-07-26 01:03:54 +08:00
2021-07-11 22:28:35 +08:00
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-07-29 17:46:28 +08:00
- uses: actions/setup-node@v2
with:
node-version: '14'
2021-07-11 22:28:35 +08:00
2021-07-29 17:54:43 +08:00
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Cache pnpm modules
uses: actions/cache@v2
2021-07-11 22:28:35 +08:00
with:
2021-07-29 17:54:43 +08:00
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
2021-07-11 22:28:35 +08:00
restore-keys: |
2021-07-29 17:54:43 +08:00
${{ runner.os }}-
2021-07-11 22:28:35 +08:00
2021-07-29 17:54:43 +08:00
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.0.2
run_install: true
2021-07-11 22:28:35 +08:00
- name: Lint
2021-07-26 01:33:22 +08:00
working-directory: packages/ui
2021-07-30 03:42:39 +08:00
run: pnpm lint && pnpm stylelint
- name: Test
working-directory: packages/ui
run: pnpm test
2021-07-11 22:28:35 +08:00
- name: Build
2021-07-26 01:33:22 +08:00
working-directory: packages/ui
2021-07-30 03:42:39 +08:00
run: pnpm build