2020-12-23 01:21:17 -05:00
|
|
|
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rust:
|
|
|
|
name: Test Rust server code
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
- 1.45.0
|
|
|
|
- nightly
|
|
|
|
include:
|
|
|
|
- rust: nightly
|
|
|
|
extra_args: "--features nightly --benches"
|
2021-02-17 01:15:54 -05:00
|
|
|
- rust: stable
|
|
|
|
extra_components: rustfmt
|
2020-12-23 01:21:17 -05:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2021-02-01 00:55:25 -05:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
server/target
|
|
|
|
key: ${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get update && sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libncurses-dev libsqlite3-dev pkgconf
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
components: ${{ matrix.extra_components }}
|
|
|
|
- name: Test
|
|
|
|
run: cd server && cargo test ${{ matrix.extra_args }} --all
|
|
|
|
- name: Check formatting
|
|
|
|
if: matrix.rust == 'stable'
|
|
|
|
run: cd server && cargo fmt --all -- --check
|
2020-12-23 01:21:17 -05:00
|
|
|
js:
|
2021-02-01 00:55:25 -05:00
|
|
|
name: Build, test, lint, and check formatting of Javascript frontend
|
2020-12-23 01:21:17 -05:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2021-02-01 00:55:25 -05:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: "14"
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-node-
|
|
|
|
- run: cd ui && npm ci
|
|
|
|
- run: cd ui && npm run build
|
|
|
|
- run: cd ui && npm run test
|
|
|
|
- run: cd ui && npm run lint
|
|
|
|
- run: cd ui && npm run check-format
|
2021-02-17 16:28:48 -05:00
|
|
|
license:
|
|
|
|
name: Check copyright/license headers
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2021-02-01 00:55:25 -05:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py
|