rapid-fs 0.1.0

A simple virtual file system API for Hypi's RAPID server
Documentation
permissions:
  contents: read
on:
  push:
    branches:
    - feature/*
  pull_request:
  workflow_dispatch:

# If new code is pushed to a PR branch, then cancel in progress workflows for that PR.
# Ensures that we don't waste CI time, and returns results quicker
# https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

name: test
jobs:
  required:
    runs-on: ubuntu-22.04
    name: ubuntu / ${{ matrix.toolchain }}
    strategy:
      matrix:
        # run on stable and beta to ensure that tests won't break on the next version of the rust
        # toolchain
        #, beta
        toolchain: [stable]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
          token: ${{ secrets.CROSS_REPO_TOKEN }}
      #Configure git to auth with the cross repo PAT
      - run: git config --global url."https://${{ secrets.CROSS_REPO_TOKEN }}@github.com".insteadOf ssh://git@github.com
#      - run: git config --global url."https://${{ secrets.CROSS_REPO_TOKEN }}@github.com".insteadOf https://github.com

      - uses: Swatinem/rust-cache@v2

      - name: Install ${{ matrix.toolchain }}
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}

      - uses: isbang/compose-action@v1.5.1
        with:
          #could have a copy in .github with different settings to local
          #compose-file: ".github/docker-compose.yml"
          compose-file: ".github/docker-compose.yml"

      - name: cargo generate-lockfile
        # enable this ci template to run regardless of whether the lockfile is checked in or not
        if: hashFiles('Cargo.lock') == ''
        run: cargo generate-lockfile

      #Build before starting K8s cluster - no pointing starting if build will fail
      - name: cargo build
        run: cargo build

      # https://twitter.com/jonhoo/status/1571290371124260865
      - name: cargo test --locked
        run: cargo test --locked --all-features --all-targets

      # https://github.com/rust-lang/cargo/issues/6669
      - name: cargo test --doc
        run: cargo test --locked --all-features --doc