Skip to content

Switch from Travis to GitHub Actions #991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI
on: [push, pull_request]
env:
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Formatting
run: |
# Install extra rustup components
rustup component add rustfmt
cargo fmt --all -- --check
- name: Correct Nightly Version
# Ensure everything is run and tested with the same nightly version
run: ci/check-nightly-version.sh
- name: Test
run: |
set -euo pipefail
IFS=$'\n\t'
# Check if the code is good
cargo build --all --locked
cargo test --all --locked
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions ci/check-nightly-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ IFS=$'\n\t'
# Extract the nightly version from all the places we declared it in
rust_toolchain="$(cat rust-toolchain)"
rust_config="$(cat RustConfig | sed -E 's/^VERSION=(nightly-[0-9]{4}-[0-9]{2}-[0-9]{2})$/\1/')"
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/')"

# Ensure all the configuration files points to the same nightly
check() {
Expand All @@ -15,6 +14,5 @@ check() {
fi
}
check RustConfig "${rust_config}"
check .travis.yml "${travis_yml}"

echo "all the configuration files points to the same nightly!"
15 changes: 0 additions & 15 deletions ci/run.sh

This file was deleted.