Skip to content

Chore/notify action #140

Chore/notify action

Chore/notify action #140

Workflow file for this run

name: CI
on:
pull_request:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- NodeVersion: 20.9.x
NodeVersionDisplayName: 20
OS: ubuntu-latest
name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }})
runs-on: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Config Git User
# should be turn to ci user
run: |
git config --local user.name "tecvan"
git config --local user.email "fanwenjie.fe@bytedance.com"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.NodeVersion }}
- name: Install Dependencies
run: node common/scripts/install-run-rush.js install
- name: Increment Build
run: node infra/rush-x/bin/run increment --action build -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
continue-on-error: true
- name: Increment Test:cov
run: node infra/rush-x/bin/run increment --action test:cov -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
continue-on-error: true
- name: Increment Lint
run: node infra/rush-x/bin/run increment --action lint -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
continue-on-error: true
- name: Increment TS Check
run: node infra/rush-x/bin/run increment --action ts-check -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
continue-on-error: true
- name: Increment Package Audit
run: node infra/rush-x/bin/run increment --action package-audit -f "${{ steps.changed-files.outputs.all_changed_files }}" -s ' '
- name: Fail if any report failed
# NOTICE: To show all reports from the previous steps, the last step should check if any jobs failed.
if: env.REPORT_RESULT == 'failed'
run: echo "::notice::Please check 「 Summary 」 for detail info" && exit 1
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true