#216 monorepo app assets #1247
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
on: [push, workflow_dispatch] | |
name: "Build, test, clippy" | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v1.3.0 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev | |
- uses: actions/checkout@v2 | |
- uses: taiki-e/install-action@nextest | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v1.3.0 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: nextest | |
args: run --all-features --retries 3 | |
coverage: | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev | |
- uses: actions/checkout@v2 | |
- name: Install Rust and llvm-tools-preview | |
run: rustup component add llvm-tools-preview --toolchain stable-x86_64-unknown-linux-gnu | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate code coverage | |
run: cargo llvm-cov --all-features --workspace --lcov --locked --output-path lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v1.3.0 | |
- run: rustup component add rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v1.3.0 | |
- run: rustup component add clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
e2e: | |
name: End-to-end tests | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev | |
- uses: pnpm/action-setup@v2.0.1 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v1.3.0 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --locked | |
- run: nohup ./target/debug/atomic-server & | |
- name: Setup and run end-to-end tests | |
working-directory: ./server/e2e_tests/ | |
run: | | |
pnpm install | |
pnpm run install-playwright | |
pnpm run test | |
- name: Upload test artifacts | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: test-results | |
path: ./server/e2e_tests/test-results/ |