Introduce initial version of Dart-based site tooling #84
Workflow file for this run
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: test | |
on: | |
# Run on PRs and pushes to the default branch. | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * 0" | |
# Declare default permissions as read only. | |
permissions: read-all | |
env: | |
# Keep for Dart SDK reporting | |
PUB_ENVIRONMENT: bot.github | |
# LTS | |
NODE_VERSION: '20' | |
# Tool location | |
BASE_DIR: ${{ github.workspace }} | |
TOOL_DIR: ${{ github.workspace }}/tool | |
jobs: | |
test: | |
name: Check excerpts and run tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- sdk: beta | |
experimental: false | |
- sdk: stable | |
experimental: false | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
submodules: recursive | |
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b | |
with: | |
sdk: ${{ matrix.sdk }} | |
- run: dart pub get | |
- run: dart run dart_site format-dart --check | |
- run: dart run dart_site analyze-dart | |
- run: dart run dart_site test-dart | |
- run: dart run dart_site refresh-excerpts --fail-on-update | |
linkcheck: | |
name: Build site and check links | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
submodules: recursive | |
- run: make build | |
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b | |
with: | |
sdk: stable | |
- run: dart pub get | |
- run: dart run dart_site check-link-references | |
- run: dart run dart_site verify-firebase-json | |
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- run: npm install -g [email protected] | |
- run: dart run dart_site check-links |