refactor: Warn on unrecognized core options #116
This file contains hidden or 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 | |
| # Replaces the former AppVeyor (Windows) and GitLab CI (Linux) pipelines: | |
| # build + run the test suite on every platform Vale ships for. | |
| on: | |
| push: | |
| branches: [v3] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Linux and macOS differ only in where xsltproc comes from, so they share a | |
| # job. Windows is separate: its runner image has no `make`. | |
| unix: | |
| name: Test (${{ matrix.name }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # a failure on one platform shouldn't hide the other | |
| matrix: | |
| include: | |
| - { name: Linux, os: ubuntu-latest, goos: linux } | |
| - { name: macOS, os: macos-latest, goos: darwin } | |
| env: | |
| CGO_ENABLED: "1" # required for the tree-sitter parsers | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # tags, for the version ldflag in `make build` | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.7" | |
| # For Asciidoctor, below -- the end-to-end suite lints AsciiDoc. | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Install documentation toolchain | |
| run: | | |
| # macOS ships xsltproc; Ubuntu doesn't. | |
| if [ "${{ runner.os }}" = "Linux" ]; then | |
| sudo apt-get -qq update | |
| sudo apt-get install -y xsltproc | |
| fi | |
| python -m pip install --upgrade docutils sphinx # rst2html | |
| gem install asciidoctor | |
| npm install -g mdx2vast | |
| curl -fsSL -o dita-ot-3.6.zip \ | |
| https://github.com/dita-ot/dita-ot/releases/download/3.6/dita-ot-3.6.zip | |
| unzip -q dita-ot-3.6.zip | |
| echo "$PWD/dita-ot-3.6/bin" >> "$GITHUB_PATH" | |
| - name: Build | |
| run: make build os=${{ matrix.goos }} exe=vale | |
| - name: Test | |
| run: make test | |
| env: | |
| VALE_E2E_STRICT: "1" # every converter above must really be present | |
| windows: | |
| name: Test (Windows) | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash # use the runner's Git bash for all steps | |
| env: | |
| CGO_ENABLED: "1" # required for the tree-sitter parsers | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.7" | |
| # For Asciidoctor, below -- the end-to-end suite lints AsciiDoc. | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| # The same converters the Linux job installs. | |
| - name: Install documentation toolchain | |
| run: | | |
| python -m pip install --upgrade docutils sphinx # rst2html | |
| gem install asciidoctor | |
| npm install -g mdx2vast | |
| choco install --no-progress -y xsltproc | |
| curl -fsSL -o dita-ot-3.6.zip \ | |
| https://github.com/dita-ot/dita-ot/releases/download/3.6/dita-ot-3.6.zip | |
| unzip -q dita-ot-3.6.zip | |
| echo "$PWD/dita-ot-3.6/bin" >> "$GITHUB_PATH" | |
| - name: Build | |
| run: go build -o bin/vale.exe ./cmd/vale | |
| - name: Test | |
| run: go test ./... | |
| env: | |
| # Fail rather than skip if a converter above didn't install, so a | |
| # gap in the toolchain can't pass for coverage. | |
| VALE_E2E_STRICT: "1" |