You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/doc/src/guide/continuous-integration.md
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,41 @@ will not fail your overall build. Please see the [Travis CI Rust
21
21
documentation](https://docs.travis-ci.com/user/languages/rust/) for more
22
22
information.
23
23
24
+
### GitHub Actions
25
+
26
+
To test your package on GitHub Actions, here is a sample `.github/workflows/ci.yml` file:
27
+
28
+
```yaml
29
+
name: Cargo Build & Test
30
+
31
+
on:
32
+
push:
33
+
34
+
jobs:
35
+
build_and_test:
36
+
name: Rust project - latest
37
+
runs-on: ${{ matrix.operating-system }}
38
+
continue-on-error: true
39
+
strategy:
40
+
fail-fast: false
41
+
matrix:
42
+
toolchain:
43
+
- stable
44
+
- beta
45
+
- nightly
46
+
operating-system:
47
+
- "ubuntu-latest"
48
+
steps:
49
+
- uses: actions/checkout@v2
50
+
- uses: actions-rs/toolchain@v1
51
+
with:
52
+
toolchain: ${{ matrix.toolchain }}
53
+
- run: cargo build --verbose
54
+
- run: cargo test --verbose
55
+
```
56
+
57
+
This will test all three release channels, see [actions-rs documentation](https://github.com/actions-rs/cargo) and [GitHub Actions documentation](https://docs.github.com/en/actions) for more information.
58
+
24
59
### GitLab CI
25
60
26
61
To test your package on GitLab CI, here is a sample `.gitlab-ci.yml` file:
0 commit comments