-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from TravisCI to Github Actions (#117)
CI is currently out of action likely because TravisCI made some changes a few years back. Reasons to switch to Github Action instead of fixing TravisCI: - I'm actually able to fix it this way, since I don't need to be the repository owner. A PR is enough. - Unsure if they even still offer free CI. Github Actions is free, reliable and well itegrated - GHA is the one I'm familiar with. Test are run on Linux, Windows, and macOS. Since the Unix test require a tty, which isn't available on the GHA runners, they are run under faketty. Unfortunately that in turn requires a fairly recent Rust version to compile and binary artifacts aren't available, so Unix systems with MSRV only run build tests. Examples are build-tested only. Formatting is also checked.
- Loading branch information
Showing
3 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
rust: ["stable", "1.58"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- name: Build | ||
run: cargo build | ||
- name: Build examples | ||
run: cargo build --examples | ||
- name: Install faketty | ||
if: matrix.rust == 'stable' && matrix.os != 'windows-latest' | ||
run: | | ||
cargo install faketty | ||
echo "fake_tty=faketty" >> $GITHUB_ENV | ||
- name: Test | ||
if: env.fake_tty || matrix.os == 'windows-latest' | ||
run: ${{ env.fake_tty }} cargo test --workspace | ||
|
||
fmt: | ||
name: rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Run rustfmt check | ||
run: cargo fmt --check |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters