Skip to content

Rewrite in ReScript #251

Rewrite in ReScript

Rewrite in ReScript #251

Workflow file for this run

on:
pull_request:
types:
- "opened"
- "reopened"
- "synchronize"
- "labeled"
- "unlabeled"
name: PR status checks
jobs:
lint:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci --include dev
- run: npm run format
- name: Check if any files changed
run: if [ -n "$(git status --untracked-files --porcelain)" ]; then (exit 1); fi
shell: bash
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci --include dev
- run: npm run res:build
- run: npm run test
dogfood:
name: Dogfood the action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # To run the version of the action from the PR.
- name: package*.json updated
uses: ./
with:
file-pattern: |
package.json
package-lock.json
skip-label: "skip package*.json"
- name: package-lock.json updated
uses: ./
with:
prereq-pattern: "package.json"
file-pattern: "package-lock.json"
skip-label: "skip package*.json"
- name: dist/index.js updated
uses: ./
with:
prereq-pattern: "src/*.res"
file-pattern: "dist/index.js"
skip-label: "skip packaging"