Skip to content

Commit

Permalink
Switch CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Aug 14, 2019
1 parent 0619303 commit fa8e012
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 23 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@master
- name: Install Rust Stable
run: |
rustup self update
rustup update ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustc -vV
- name: Run tests
run: cargo test

rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust Stable
run: |
rustup update stable
rustup default stable
rustup component add rustfmt
- name: Run rustfmt
run: cargo fmt -- --check

publish_docs:
name: Publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust Stable
run: |
rustup update stable
rustup default stable
- name: Build documentation
run: cargo doc --no-deps
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Publish documentation
run: |
cd target/doc
git init
git add .
git -c user.name='ci' -c user.email='ci' commit -m init
git push -f -q https://$ACTOR:$GITHUB_TOKEN@github.com/$REPOSITORY HEAD:gh-pages
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
ACTOR: ${{ github.actor }}
REPOSITORY: ${{ github.repository }}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
//! ```

#![no_std]

#![doc(html_root_url = "https://docs.rs/cfg-if")]
#![deny(missing_docs)]
#![cfg_attr(test, deny(warnings))]
Expand Down

0 comments on commit fa8e012

Please sign in to comment.