diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2053cae4..08444eee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,34 +14,37 @@ jobs: formatting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt --check check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Rust cache - uses: Swatinem/rust-cache@v2 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - name: Install native system dependencies run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev if: runner.os == 'linux' - - uses: r7kamura/rust-problem-matchers@b5092889692373e09c98a0aeb380a044a651ab86 - - name: Run clippy and cargo checks - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings + - uses: r7kamura/rust-problem-matchers@v1 + - run: cargo clippy -- -D warnings + + test: + strategy: + matrix: + # TODO: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - name: Install native system dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + if: runner.os == 'linux' + - uses: r7kamura/rust-problem-matchers@v1 + - run: cargo test --workspace docker: runs-on: ubuntu-latest diff --git a/crates/byond/src/tgm/parsing.rs b/crates/byond/src/tgm/parsing.rs index 1213bf8c..82e5fd7e 100644 --- a/crates/byond/src/tgm/parsing.rs +++ b/crates/byond/src/tgm/parsing.rs @@ -152,7 +152,8 @@ where /// Parses an assignment in the form of `left = right`, ignoring whitespace. /// -/// ``` +/// ```ignore +/// # // docs cant see and test `assignment` (probably because not pub) /// assert_eq!(assignment(tag("you"), tag("awesome"))("you= awesome"), Ok(("you= awesome", ("you", "awesome")))) /// ``` fn assignment<'a, FL: 'a, FR: 'a, L, R, E: 'a + ParseError<&'a str> + ContextError<&'a str>>(