rs-exporter 0.0.0-a

Export a part of the Rust AST to JSON
Documentation
# https://github.com/nextest-rs/reuse-build-partition-example/actions/workflows/ci.yml.

name: CI

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]
  schedule:
    - cron: 0 1 * * *

env:
  CARGO_TERM_COLOR: always

jobs:
  build-test-artifacts:
    name: Build test artifacts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Install nextest
        uses: taiki-e/install-action@nextest
      - name: Build and archive tests
        run: cargo nextest archive --archive-file nextest-archive.tar.zst
      - name: Upload archive to workflow
        uses: actions/upload-artifact@v4
        with:
          name: nextest-archive
          path: nextest-archive.tar.zst

  run-tests-partitioned:
    name: Run tests with partitioning
    runs-on: ubuntu-latest
    needs: build-test-artifacts
    strategy:
      matrix:
        partition: [1, 2]
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - run: mkdir -p ~/.cargo/bin
      - name: Install nextest
        uses: taiki-e/install-action@nextest
      - name: Download archive
        uses: actions/download-artifact@v4
        with:
          name: nextest-archive
      - name: Run tests
        run: |
          ~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst \
            --partition count:${{ matrix.partition }}/2