Skip to content

feat: further improve ci runtime #1743

feat: further improve ci runtime

feat: further improve ci runtime #1743

Workflow file for this run

name: "test"
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ develop, develop-0.1, develop-0.2 ]
pull_request:
branches: [ develop, develop-0.1, develop-0.2 ]
jobs:
test_fmt_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Maximize build space
if: runner.os == 'Linux'
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Install nix
uses: cachix/install-nix-action@v27
with:
install_url: https://releases.nixos.org/nix/nix-2.24.4/install
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: Swatinem/rust-cache@v2
- name: rustfmt check
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command cargo fmt --all --check
- name: clippy check
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command cargo clippy --all-features --all-targets -- -D warnings
- name: unittests
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command cargo test --no-fail-fast
testbuild:
runs-on: ubuntu-latest
strategy:
matrix:
template: [ svelte, vue, lit, react, vanilla ]
steps:
- uses: actions/checkout@v4
- name: Maximize build space
if: runner.os == 'Linux'
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Install nix
uses: cachix/install-nix-action@v27
with:
install_url: https://releases.nixos.org/nix/nix-2.24.4/install
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: Swatinem/rust-cache@v2
- name: Build and test
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command ./run_test.sh -t ${{ matrix.template }}
testbuild_by_scope:
runs-on: ubuntu-latest
strategy:
matrix:
scope:
- hello_world
- holo_integration
steps:
- uses: actions/checkout@v4
- name: Maximize build space
if: runner.os == 'Linux'
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Install nix
uses: cachix/install-nix-action@v27
with:
install_url: https://releases.nixos.org/nix/nix-2.24.4/install
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: Swatinem/rust-cache@v2
- name: Build and test
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command ./run_test.sh -s ${{ matrix.scope }}