chore: dependencies #13
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: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-lint: | |
name: Build & Lint | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'icrawl' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: yarn --immutable | |
- name: Build & Lint | |
run: yarn lint | |
validate-generated-index: | |
name: Validate Generated Index | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'icrawl' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: yarn --immutable | |
- name: Generate new index | |
run: yarn gen-index | |
- name: Error if index is different | |
run: | | |
git status | |
if ! git diff-index --quiet HEAD --; then | |
echo "::error file=src/index.ts::File did not match generated file after script. Please review and adjust accordingly." | |
exit 1; | |
fi |