mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-11-28 08:08:03 -08:00
* ci: install node and yarn with mise, not corepack Node 25+ no longer ships corepack. The integrity job now installs node and yarn from mise.toml through jdx/mise-action, and keys the yarn cache on the resolved node version. * build: upgrade TypeScript to 6 and Node types to 24 @types/node now matches the node24 runtime the action runs on; @types/node 24 needs TypeScript 5.2+. tsconfig moves to nodenext resolution (node10 is deprecated in TypeScript 6) and dist is rebuilt with the new emitter. * build: move tooling and CI to Node 26.12.1 mise.toml pins Node 26.12.1, which the Integrity job now installs through mise-action. The action runtime stays node24, the highest GitHub Actions offers. --------- Co-authored-by: Frostebite <[email protected]>
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
name: Integrity
|
|
|
|
on:
|
|
push: { branches: [main] }
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled]
|
|
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
statuses: write
|
|
|
|
env:
|
|
CODECOV_TOKEN: '2f2eb890-30e2-4724-83eb-7633832cf0de'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install node and yarn (from mise.toml)
|
|
uses: jdx/mise-action@v5
|
|
with:
|
|
install_args: node yarn
|
|
- name: Resolve yarn cache folder
|
|
id: yarn-config
|
|
run: |
|
|
echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
|
|
echo "nodeVersion=$(node --version)" >> "$GITHUB_OUTPUT"
|
|
- name: Restore yarn install cache (node_modules + cacheFolder + install-state)
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
${{ steps.yarn-config.outputs.cacheFolder }}
|
|
.yarn/install-state.gz
|
|
key: yarn-v2-${{ runner.os }}-node-${{ steps.yarn-config.outputs.nodeVersion }}-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: |
|
|
yarn-v2-${{ runner.os }}-node-${{ steps.yarn-config.outputs.nodeVersion }}-
|
|
- name: Install deps
|
|
env:
|
|
YARN_ENABLE_HARDENED_MODE: 'false'
|
|
run: |
|
|
case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac
|
|
yarn install --immutable
|
|
- run: yarn lint
|
|
- run: yarn format:check
|
|
- run: yarn test:ci --coverage
|
|
- run: bash <(curl -s https://codecov.io/bash)
|
|
- run: yarn build || { echo "build command should always succeed" ; exit 61; }
|
|
# - run: yarn build --quiet && git diff --quiet dist || { echo "dist should be auto generated" ; git diff dist ; exit 62; }
|