Skip to content

Commit dcbc57d

Browse files
committed
Add tests
1 parent ffb9cfa commit dcbc57d

5 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Tests
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
toolchain:
19+
- stable
20+
- beta
21+
use-cache:
22+
- true
23+
- false
24+
25+
defaults:
26+
run:
27+
working-directory: tests
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: ./
33+
with:
34+
toolchain: ${{ matrix.toolchain }}
35+
use-cache: ${{ matrix.use-cache }}
36+
components: rustfmt
37+
workspaces: tests
38+
39+
- run: cargo fmt --check
40+
- run: cargo build

tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

tests/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "tests"
3+
version = "0.1.0"
4+
edition = "2024"
5+
publish = false
6+
7+
[dependencies]

tests/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)