Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add backports to 0.4000.0 rc.3 #432

Merged
merged 10 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 60 additions & 24 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.4]
branches: [develop, develop-0.4]
pull_request:
branches: [develop, develop-0.1, develop-0.2, develop-0.4]
branches: [develop, develop-0.4]

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 @@ -24,31 +62,24 @@ jobs:
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]
Expand All @@ -65,21 +96,24 @@ jobs:
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 @@ -98,15 +132,17 @@ jobs:
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
Loading