aws behaviour version, take 2 #133
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
name: Rust | |
on: | |
push: | |
branches: [ root ] | |
pull_request: | |
branches: [ root ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rustfmt, clippy | |
# - name: Install buf | |
# run: curl -sSL "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m)" -o "/usr/local/buf" && chmod +x "/usr/local/buf" | |
- name: Check | |
run: cargo check | |
- name: Format | |
run: cargo fmt --all | |
- name: Clippy | |
run: cargo clippy -- -D warnings | |
- name: Build docs | |
run: cargo rustdoc --lib -- --enable-index-page -Z unstable-options | |
- name: Setup git | |
run: git config --global user.name ${GITHUB_ACTOR} && git config --global user.email ${GITHUB_ACTOR}@users.noreply.github.com | |
- name: Push docs | |
run: rm -rf docs && mv target/doc docs && cp -a swagger docs && cp gen/openapiv2/epp.swagger.json docs/swagger && git add docs && (git diff-index --quiet HEAD docs || git commit -m "Autogen docs") && git push | |
- name: Push other | |
run: git add . && (git diff-index --quiet HEAD || git commit -m "rustfmt") && git push |