diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..0bd1cc3f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + test: + name: Build & test (Node ${{ matrix.node-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: [20.x, 22.x] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + # yarn.lock is gitignored in this repo, so there is no lockfile to pin + # against or to key a cache on — install resolves from package.json. + - run: yarn install + - run: yarn lib:build + - run: yarn lib:test + + lint: + name: Lint + runs-on: ubuntu-latest + # Non-blocking for now: a handful of react-hooks v7 findings and one + # deferred public type are still open. Drop continue-on-error once the + # remaining errors are resolved to make lint a required check. + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22.x + - run: yarn install + - run: yarn lint diff --git a/.github/workflows/daily-project-check.yml b/.github/workflows/daily-project-check.yml deleted file mode 100644 index 5776ce77..00000000 --- a/.github/workflows/daily-project-check.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Daily project check - -on: - schedule: - # build runs every weekday at 6AM UTC - - cron: '0 6 * * 1-5' - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x] - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, test and lint - run: | - npm i - npm run build - npm run jest:test - npm run lint - env: - CI: true diff --git a/.github/workflows/project-check.yml b/.github/workflows/project-check.yml deleted file mode 100644 index 854186a4..00000000 --- a/.github/workflows/project-check.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Project check - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x] - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, test and lint - run: | - npm i - npm run build - npm run jest:test - npm run lint - env: - CI: true