Tests run #1036
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: Tests run | |
permissions: | |
contents: read | |
discussions: write | |
env: | |
TOOLCHAIN_BUILD: "nightly-2022-01-27" | |
# Controls when the action will run. | |
on: | |
pull_request: | |
branches: | |
- master | |
- "release/**" | |
- "feature/**" | |
- "bugfix/**" | |
- "!dependabot/**" | |
paths: | |
- "node/**" | |
- "pallets/**" | |
- "primitives/**" | |
- "runtime/**" | |
schedule: | |
- cron: "0 10 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./ | |
# Cancel any in-flight jobs for the same PR/branch so there's only one active | |
# at a time | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
rust-checks: | |
runs-on: ubuntu-20.04 | |
if: github.actor != 'dependabot[bot]' | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install Rust for Substrate | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.TOOLCHAIN_BUILD }} | |
override: false | |
target: wasm32-unknown-unknown | |
components: rustfmt | |
# Check codebase style, will output error 1 if there is formatting to be done | |
# Continues on error for now, need to format code fully first, | |
# then remove `continue-on-error` to enforce it | |
- name: Run Fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run Tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all | |
- uses: actions-rs/audit-check@v1 | |
with: | |
token: ${{ secrets.BOT_GITHUB_TOKEN }} |