tiktok-sparo/.github/workflows/ci.yml
2024-03-11 15:36:03 -07:00

53 lines
1.5 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.platform }}-${{ matrix.node }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
node:
- '18'
platform:
- ubuntu-latest
- windows-latest
name: '${{ matrix.platform }} / Node.js ${{ matrix.node }}'
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Configure Git
env:
GITHUB_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
run: |
git config --local user.name tiktokbot
git config --local user.email tiktokbot@users.noreply.github.com
git config --global credential.helper '!f() { echo "protocol=https\nhost=github.com" ; echo "username=oauth_token" ; echo "password=${GITHUB_TOKEN}" ; }; f'
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Rush rebuild
run: node common/scripts/install-run-rush.js rebuild --verbose --production
- name: Rush test
run: node common/scripts/install-run-rush.js test --verbose