[PLATFORM-2265]: Documenting custom claims API #273
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
# Avoid duplicate jobs on PR from a branch on the same repo | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup target add wasm32-unknown-unknown | |
- name: install tools | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- name: Build | |
run: cargo build --workspace --all-features | |
- name: cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
run: cargo clippy --workspace --all-features -- -D warnings | |
- name: Build docs | |
run: cargo doc --document-private-items --workspace --all-features --no-deps | |
- name: Build web | |
run: trunk build web/index.html | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
test: | |
# Avoid duplicate jobs on PR from a branch on the same repo | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test | |
alls-green: | |
# I hate github actions. | |
# A default status check of success() is applied unless you include another status check function, like always(). | |
# https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions | |
# https://stackoverflow.com/questions/58858429/how-to-run-a-github-actions-step-even-if-the-previous-step-fails-while-still-f | |
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- test | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |