Skip to content

Commit c1b17e3

Browse files
committed
Switch from Travis to GitHub Actions
1 parent fea5cb9 commit c1b17e3

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
on: [push, pull_request]
3+
env:
4+
RUST_BACKTRACE: 1
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Formatting
11+
run: |
12+
# Install extra rustup components
13+
rustup component add rustfmt
14+
cargo fmt --all -- --check
15+
- name: Correct Nightly Version
16+
# Ensure everything is run and tested with the same nightly version
17+
run: ci/check-nightly-version.sh
18+
- name: Test
19+
run: |
20+
set -euo pipefail
21+
IFS=$'\n\t'
22+
# Check if the code is good
23+
cargo build --all --locked
24+
cargo test --all --locked

.travis.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

ci/check-nightly-version.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ IFS=$'\n\t'
55
# Extract the nightly version from all the places we declared it in
66
rust_toolchain="$(cat rust-toolchain)"
77
rust_config="$(cat RustConfig | sed -E 's/^VERSION=(nightly-[0-9]{4}-[0-9]{2}-[0-9]{2})$/\1/')"
8-
travis_yml="$(cat .travis.yml | grep '^rust: ' | head -n 1 | sed -E 's/^rust: (nightly-[0-9]{4}-[0-9]{2}-[0-9]{2})$/\1/')"
98

109
# Ensure all the configuration files points to the same nightly
1110
check() {
@@ -15,6 +14,5 @@ check() {
1514
fi
1615
}
1716
check RustConfig "${rust_config}"
18-
check .travis.yml "${travis_yml}"
1917

2018
echo "all the configuration files points to the same nightly!"

ci/run.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)