Job hooks and dockerization #30
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: Validate PR | |
on: | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: rust-validation-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Git LFS pull | |
run: git lfs pull | |
- name: Install protobuf | |
run: sudo apt-get install protobuf-compiler | |
- name: Generate certs | |
run: ./playground/generate_certs.sh | |
- name: Run Docker Compose | |
run: docker-compose up --abort-on-container-exit | |
formatting: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Check Formatting | |
run: cargo fmt -- --check | |
linting: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Install protobuf | |
run: sudo apt-get install protobuf-compiler | |
- name: Run Clippy | |
run: cargo clippy --tests -- -D warnings | |
testing: | |
name: Cargo Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install protobuf | |
run: sudo apt-get install protobuf-compiler | |
- name: Run Tests | |
run: cargo test --features=substrate |