Files
pezkuwi-telemetry/.github/workflows/backend.yml
T
James Wilson fe19a75414 Un-brittle-ify backend E2E tests and have them run by default again in CI (#397)
* test running tests

* Add delay so that core knows about node before feed subscribes to limit chance of race

* move delaye to the right place

* Don't do expensive docker step untill we will be pushing the image

* docker test skipped as hoped, so push to 'true'

* just remove docker steps in github CI entirely since they aren't needed by anything (gitlab CI does this stuff now)

* run CI on pull requests too to catch PRs from forks
2021-09-06 11:30:17 +01:00

111 lines
2.4 KiB
YAML

name: Backend CI
on:
push:
paths:
- '.github/workflows/backend.yml'
- 'backend/**'
- '!frontend/**'
pull_request:
paths:
- '.github/workflows/backend.yml'
- 'backend/**'
- '!frontend/**'
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: ./backend
jobs:
build:
name: Check Code
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2.3.4
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
with:
working-directory: backend
- name: Build
run: cargo check --all-targets
fmt:
name: Run rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2.3.4
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
with:
working-directory: backend
- name: Cargo fmt
run: cargo fmt --all -- --check
docs:
name: Check Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2.3.4
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
with:
working-directory: backend
- name: Check internal documentation links
run: RUSTDOCFLAGS="--deny broken_intra_doc_links" cargo doc --verbose --workspace --no-deps --document-private-items
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2.3.4
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
with:
working-directory: backend
- name: Cargo test
run: cargo test --verbose --jobs 1