Skip to content

Commit

Permalink
chore: backport and release 0.3000.9 (#417)
Browse files Browse the repository at this point in the history
* Bump versions

* Nix flake update

* fix: Refactor/custom templates (#397)

* Fix custom template flake

* Refactor custom templates

* chore: Update holochain dependencies (#398)

* Update dependencies

* Remove unused dependency

* fix: Skip writing scaffold config for nixified custom templates (#415)

* Add skip_config_check global flag to scaffolding

* Prefer not writing the scaffold config for nixified custom templates

* Fix rustfmt warning

* fix: Fix misplaced doc comments (#411)

* Fix misplaced doc comments

* Slightly refactor link_type integrity codegen

* Remove instances of SignalType

* feat: further improve ci runtime (#414)

* Remove dependency to holochain

* Add rust-cache

* Add cachix nix config

* Add ci job concurrency options

* Update cachix configurations

* Run rust checks/tests outside nix

* add missing components

* Cache rust builds

* Bump holochain deps

* Update rustdocs

* Build cargo deps separately

* refactor flake

* Update maintenance docs

* Add extraPullNames input to cachix actions

* Add nix_build step

* Extend extra-substituters and public-keys in nixConfig

* Fix ci workflow

* Bump client-js version
  • Loading branch information
c12i authored Nov 26, 2024
1 parent 7ca7aee commit 07b559f
Show file tree
Hide file tree
Showing 130 changed files with 1,837 additions and 4,437 deletions.
110 changes: 73 additions & 37 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
name: "test"
name: "scaffolding-ci"

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ develop, develop-0.1, develop-0.2, develop-0.3 ]
branches: [develop, develop-0.3]
pull_request:
branches: [ develop, develop-0.1, develop-0.2, develop-0.3 ]
branches: [develop, develop-0.3]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
test_fmt_lint:
cargo_test:
name: cargo_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.80.0
- uses: Swatinem/rust-cache@v2
- run: cargo test --no-fail-fast

rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.80.0
components: rustfmt
- run: cargo fmt --all -- --check

clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.80.0
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings

nix_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,68 +56,64 @@ jobs:
if: runner.os == 'Linux'
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-dotnet: "true"
remove-android: "true"
remove-codeql: "true"
remove-docker-images: "true"

- name: Install nix
uses: cachix/install-nix-action@v27
uses: cachix/install-nix-action@v30
with:
install_url: https://releases.nixos.org/nix/nix-2.24.4/install

- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- 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: holochain-scaffolding-cli
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: holochain-ci

- name: unittests
- name: Build
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command cargo test --no-fail-fast
nix develop --accept-flake-config .#ci --command echo 'test'
testbuild:
runs-on: ubuntu-latest
needs: [nix_build]
strategy:
matrix:
template: [ svelte, vue, lit, react, vanilla ]
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'
remove-dotnet: "true"
remove-android: "true"
remove-codeql: "true"
remove-docker-images: "true"

- name: Install nix
uses: cachix/install-nix-action@v27
uses: cachix/install-nix-action@v30
with:
install_url: https://releases.nixos.org/nix/nix-2.24.4/install

- uses: cachix/cachix-action@v15
with:
name: holochain-ci
name: holochain-scaffolding-cli
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: holochain-ci

- name: Build and test
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command ./run_test.sh -t ${{ matrix.template }}
nix develop --accept-flake-config .#ci --command ./run_test.sh -t ${{ matrix.template }}
testbuild_by_scope:
runs-on: ubuntu-latest
needs: [nix_build]
strategy:
matrix:
scope:
Expand All @@ -92,21 +126,23 @@ jobs:
if: runner.os == 'Linux'
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-dotnet: "true"
remove-android: "true"
remove-codeql: "true"
remove-docker-images: "true"

- name: Install nix
uses: cachix/install-nix-action@v27
uses: cachix/install-nix-action@v30
with:
install_url: https://releases.nixos.org/nix/nix-2.24.4/install

- uses: cachix/cachix-action@v15
with:
name: holochain-ci
name: holochain-scaffolding-cli
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: holochain-ci

- name: Build and test
run: |
cd $GITHUB_WORKSPACE
nix develop .#ci --command ./run_test.sh -s ${{ matrix.scope }}
nix develop --accept-flake-config .#ci --command ./run_test.sh -s ${{ matrix.scope }}
Loading

0 comments on commit 07b559f

Please sign in to comment.