Update config.json (#112155) #240491
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
build-test: | |
name: Build and Test | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- name: Set Environment Variables | |
run: | | |
echo "TMP=${{ runner.temp }}" >> $GITHUB_ENV | |
if [ "${{ github.event_name }}" == "push" ]; then | |
echo "BASE_COMMIT=${{ github.event.push.before }}" >> $GITHUB_ENV | |
echo "HEAD_COMMIT=${{ github.event.push.after }}" >> $GITHUB_ENV | |
fi | |
if [ "${{ github.event_name }}" == "pull_request" ]; then | |
echo "BASE_COMMIT=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV | |
echo "HEAD_COMMIT=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v4 | |
- run: git fetch origin "$BASE_COMMIT" "$HEAD_COMMIT" --depth 1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- run: yarn --frozen-lockfile | |
- run: yarn ci | |
- run: bin/compare-git-configs.sh "$BASE_COMMIT" "$HEAD_COMMIT" |