mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
94 lines
1.9 KiB
YAML
94 lines
1.9 KiB
YAML
name: Main
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- 'push-action/**'
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: main-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
main-build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Node and pnpm
|
|
uses: silverhand-io/actions-node-pnpm-run-steps@v2
|
|
|
|
- name: Build
|
|
run: pnpm ci:build
|
|
|
|
main-lint:
|
|
# avoid out of memory issue since macOS has bigger memory
|
|
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
runs-on: ubuntu-latest-4-cores
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Node and pnpm
|
|
uses: silverhand-io/actions-node-pnpm-run-steps@v2
|
|
|
|
- name: Prepack
|
|
run: pnpm prepack
|
|
|
|
- name: Lint
|
|
run: pnpm ci:lint
|
|
|
|
- name: Stylelint
|
|
run: pnpm ci:stylelint
|
|
|
|
main-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node_version: [16, 18]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Node and pnpm
|
|
uses: silverhand-io/actions-node-pnpm-run-steps@v2
|
|
with:
|
|
node-version: ${{ matrix.node_version }}
|
|
|
|
- name: Prepack
|
|
run: pnpm prepack
|
|
|
|
- name: Test
|
|
run: pnpm ci:test
|
|
|
|
- name: Codecov core
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
flags: core
|
|
directory: ./packages/core
|
|
|
|
- name: Codecov ui
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
flags: ui
|
|
directory: ./packages/ui
|
|
|
|
main-dockerize:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Build
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|