-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0619303
commit fa8e012
Showing
3 changed files
with
60 additions
and
23 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,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 }} |
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