name: cargo test --workspace
on:
  push:
    branches: 
      - master
      - develop

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        build: [--release, ~]

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@v5

      - name: Install Deno
        uses: denoland/setup-deno@v2
        with:
          deno-version: v2.x

      - name: Download test suite
        run: |
          deno run -A resources/get-xmlconf.ts
          deno run -A resources/get-xslt-testsuite.ts

      - name: Check Rust version
        run: |
          rustup --version
          rustc --version
          cargo --version
            
      - name: Run `cargo test --workspace`
        run: cargo test --workspace ${{ matrix.build }}
