Some checks failed
renovate/artifacts Artifact file update failure
renovate/stability-days Updates have not met minimum release age requirement
CI / Check Dist (pull_request) Successful in 1m2s
CI / Dry-Run Prerelease (pull_request) Successful in 1m0s
Run TAS / run-tas (pull_request) Failing after 3m25s
CI / Dry-Run (pull_request) Successful in 13s
CI / Test (pull_request) Successful in 17s
100 lines
3.0 KiB
YAML
100 lines
3.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: npm ci
|
|
- name: Format code
|
|
run: npm run format
|
|
- name: Typecheck
|
|
run: npm run typecheck
|
|
- name: Run test
|
|
run: npm run test
|
|
|
|
check-dist:
|
|
name: Check Dist
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: npm ci
|
|
- run: mv dist dist_orig
|
|
- run: npm run build
|
|
- run: |
|
|
original_hash=$(sha256sum dist_orig/index.js | cut -d' ' -f1)
|
|
new_hash=$(sha256sum dist/index.js | cut -d' ' -f1)
|
|
if [ "$original_hash" != "$new_hash" ]; then
|
|
echo "Build is not up to date. Original hash: $original_hash, new hash: $new_hash"
|
|
exit 1
|
|
fi
|
|
|
|
dry-run:
|
|
name: Dry-Run
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: npm ci
|
|
- name: Increment tag
|
|
id: increment-tag
|
|
uses: ./
|
|
with:
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
- name: Print new tag
|
|
run: |
|
|
if [ -z "${{ steps.increment-tag.outputs.new-tag }}" ]; then
|
|
echo "No new tag found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "New tag: ${{ steps.increment-tag.outputs.new-tag }}"
|
|
|
|
dry-run-prerelease:
|
|
name: Dry-Run Prerelease
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: npm ci
|
|
- name: Create prerelease tag
|
|
id: prerelease-tag
|
|
uses: ./
|
|
with:
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
prerelease: "true"
|
|
- name: Print new tag
|
|
run: |
|
|
if [ -z "${{ steps.prerelease-tag.outputs.new-tag }}" ]; then
|
|
echo "No new tag found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "New tag: ${{ steps.prerelease-tag.outputs.new-tag }}"
|
|
- name: Verify prerelease tag format
|
|
run: |
|
|
if [[ "${{ steps.prerelease-tag.outputs.new-tag }}" =~ -rc-[a-f0-9]{7,}$ ]]; then
|
|
echo "✓ Prerelease tag format is correct"
|
|
else
|
|
echo "✗ Prerelease tag format is incorrect. Expected format: X.Y.Z-rc-<sha>"
|
|
exit 1
|
|
fi
|