feat: use react compiler #3233
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: CI & Release | |
on: | |
pull_request: | |
push: | |
branches: | |
- alpha | |
- beta | |
- next | |
- main | |
permissions: | |
contents: read # for checkout | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- run: pnpm install | |
- run: pnpm ts:check | |
- run: pnpm build | |
lint: | |
needs: [build] | |
name: "ESLint" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- run: pnpm install | |
- name: Register Problem Matcher for ESLint that handles -f compact and shows warnings and errors inline on PRs | |
run: echo "::add-matcher::.github/eslint-compact.json" | |
- run: "pnpm lint -f compact --rule 'no-warning-comments: [off]' --max-warnings 0" | |
test: | |
needs: [build] | |
runs-on: ${{ matrix.platform }} | |
name: Node.js ${{ matrix.node-version }} / ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
# node-version: [lts/*, current] | |
node-version: [lts/*] | |
include: | |
- platform: macos-latest | |
node-version: lts/* | |
env: | |
CYPRESS_CACHE_FOLDER: "~/.cache/Cypress" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: pnpm install | |
- run: pnpm build | |
- run: pnpm test | |
- run: pnpm test:browser | |
- name: Upload Cypress Artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cypress | |
path: | | |
cypress/screenshots | |
cypress/videos | |
sanity-e2e: | |
if: ${{ github.event_name == 'pull_request' }} | |
permissions: | |
contents: read | |
actions: write | |
name: "Run Studio End-to-end tests" | |
uses: sanity-io/sanity/.github/workflows/e2e-ui.yml@next | |
secrets: inherit | |
release: | |
permissions: | |
id-token: write # to enable use of OIDC for npm provenance | |
name: "Semantic release" | |
needs: [lint, test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.ECOSPARK_APP_ID }} | |
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
# Need to fetch entire commit history to | |
# analyze every commit since last release | |
fetch-depth: 0 | |
# Uses generated token to allow pushing commits back | |
token: ${{ steps.app-token.outputs.token }} | |
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- run: corepack enable && pnpm --version | |
- run: pnpm install | |
# Branches that will release new versions are defined in .releaserc.json | |
- run: pnpm exec semantic-release | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |