Skip to content

[ci] [workflow] pr sync #12

[ci] [workflow] pr sync

[ci] [workflow] pr sync #12

Workflow file for this run

name: CI
on:
push:
branches: ['ci/**', 'main']
pull_request:
branches: ['main']
workflow_dispatch:
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
NODE_VERSION: '18'
GIT_USER_NAME: 'mocayo'
GIT_USER_EMAIL: 'qihai@bytedance.com'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Config Git User
# should be turn to ci user
run: |
git config --local user.name ${{ env.GIT_USER_NAME }}
git config --local user.email ${{ env.GIT_USER_EMAIL }}
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store
- name: Install Dependencies
run: node common/scripts/install-run-rush.js install
- name: Build All
run: node common/scripts/install-run-rush.js rebuild --verbose --timeline
- name: Test:cov All
run: node common/scripts/install-run-rush.js test:cov --verbose --timeline
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: coze-dev/cozeloop-js
fail_ci_if_error: false
verbose: true