Skip to content

Commit

Permalink
Update weekly and ci improvements (#101)
Browse files Browse the repository at this point in the history
* Update weekly and add taplo

* Update dependencies and format toml files

* Add yaml formatter and format

* Check formatting in CI

* Remove inputsFrom

* CI improvements
  • Loading branch information
ThetaSinner authored Sep 27, 2024
1 parent 959691c commit 84a5576
Show file tree
Hide file tree
Showing 13 changed files with 294 additions and 317 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cargo_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Update Cargo.lock"
title: "Update Cargo.lock"
body: "This PR updates the Cargo.lock file."
branch: "update-cargo-lock"
branch-suffix: "short-commit-hash"
base: "main"
commit-message: "Update Cargo.lock"
title: "Update Cargo.lock"
body: "This PR updates the Cargo.lock file."
branch: "update-cargo-lock"
branch-suffix: "short-commit-hash"
base: "main"
12 changes: 6 additions & 6 deletions .github/workflows/flake_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Update flake.lock"
title: "Update flake.lock"
body: "This PR updates the flake.lock file."
branch: "update-flake-lock"
branch-suffix: "short-commit-hash"
base: "main"
commit-message: "Update flake.lock"
title: "Update flake.lock"
body: "This PR updates the flake.lock file."
branch: "update-flake-lock"
branch-suffix: "short-commit-hash"
base: "main"
8 changes: 6 additions & 2 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ env:
INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }}
WT_METRICS_DIR: "${{ github.workspace }}/telegraf/metrics"

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

jobs:
local-test:
runs-on: [self-hosted, wind-tunnel]
strategy:
fail-fast: false
matrix:
# To run a local test with default configuration, add the scenario name to this array.
scenario: [ zome_call_single_value, single_write_many_read, write_read, write_query, local_signals, write_validated ]
scenario: [zome_call_single_value, single_write_many_read, write_read, write_query, local_signals, write_validated]
# To run a local test with additional configuration, add the scenario name and `extra-args` as an `include` item.
include:
- scenario: dht_sync_lag
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
fail-fast: false
matrix:
# To run a test with TryCP and default configuration, add the scenario name to this array.
scenario: [ trycp_write_validated, remote_call_rate, validation_receipts ]
scenario: [trycp_write_validated, remote_call_rate, validation_receipts]
# To run a test with TryCP and additional configuration, add the scenario name and `extra-args` as an `include` item.
include:
- scenario: two_party_countersigning
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: "test"

on:
push:
branches: [ main, develop ]
branches: [main]
pull_request:
branches: [ main, develop ]
branches: [main]
merge_group:

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

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -49,6 +49,14 @@ jobs:
run: |
nix develop .#ci -c bash -c "shellcheck scripts/*.sh"
- name: Check TOML formatting
run: |
nix develop .#ci -c bash -c "./scripts/format-toml.sh --check"
- name: Check YAML formatting
run: |
nix develop .#ci -c bash -c "./scripts/format-yaml.sh -lint"
- name: Check Nix formatting
run: |
nix develop .#ci -c bash -c "source ./scripts/checks.sh && check_nix_fmt"
Expand All @@ -74,20 +82,20 @@ jobs:
run: |
# Start a sandbox conductor and run it in the background
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#zome_call_single_value -- --connection-string ws://localhost:8888 --duration 5 --no-progress
pkill hc && pkill holochain && pkill lair-keystore
- name: Smoke test - single_write_many_read
run: |
# Start a sandbox conductor and run it in the background
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#single_write_many_read -- --connection-string ws://localhost:8888 --duration 5 --no-progress
pkill hc && pkill holochain && pkill lair-keystore
- name: Smoke test - dht_sync_lag
Expand Down Expand Up @@ -180,7 +188,7 @@ jobs:
- name: Smoke test - remote_call_rate
run: |
set -x
# Start local network services
nix develop .#ci -c bash -c "hc-run-local-services --bootstrap-port 4422 --signal-port 4423 &"
# Start a TryCP instance
Expand Down
5 changes: 5 additions & 0 deletions .yamlfmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
formatter:
type: basic
retain_line_breaks_single: true
trim_trailing_whitespace: true
eof_newline: true
Loading

0 comments on commit 84a5576

Please sign in to comment.