Skip to content

Commit ee246f9

Browse files
committed
Enable caching
1 parent 887533e commit ee246f9

5 files changed

Lines changed: 18 additions & 14 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
contents: read
4040
packages: write
4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
4343
with:
4444
ref: ${{ inputs.new_ref }}
4545

.github/workflows/docs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
build:
2626
runs-on: ubuntu-latest
2727
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
3029

3130
- name: Setup Hugo
3231
uses: peaceiris/actions-hugo@v3

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
app: ${{ steps.new_app.outputs.new_version }}
3030
new_ref: ${{ steps.commit.outputs.commit }}
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333

3434
- name: Current versions
3535
id: version
3636
run: |
37-
echo "app=$(grep -oP '(?<=^version = ")[\w\.]+' Cargo.toml)" >> $GITHUB_OUTPUT
38-
echo "chart=$(grep -oP '(?<=^version: ).+' chart/Chart.yaml)" >> $GITHUB_OUTPUT
37+
echo "app=$(grep -oP '(?<=^version = ")[\w\.]+' Cargo.toml)" >> "$GITHUB_OUTPUT"
38+
echo "chart=$(grep -oP '(?<=^version: ).+' chart/Chart.yaml)" >> "$GITHUB_OUTPUT"
3939
4040
- uses: actions-ecosystem/action-bump-semver@v1
4141
id: new_app
@@ -76,7 +76,7 @@ jobs:
7676
- default
7777
- kube
7878
steps:
79-
- uses: actions/checkout@v4
79+
- uses: actions/checkout@v5
8080
with:
8181
ref: ${{ needs.bump.outputs.new_ref }}
8282

@@ -87,7 +87,7 @@ jobs:
8787
uses: actions-rust-lang/setup-rust-toolchain@v1
8888
with:
8989
target: ${{ matrix.target.triplet }}
90-
cache: true # Sets up rust cache automatically
90+
cache: true # Sets up rust cache automatically
9191

9292
- name: Compile
9393
run: |
@@ -141,7 +141,7 @@ jobs:
141141
contents: read
142142
packages: write
143143
steps:
144-
- uses: actions/checkout@v4
144+
- uses: actions/checkout@v5
145145
with:
146146
ref: ${{ needs.bump.outputs.new_ref }}
147147

.github/workflows/test.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ jobs:
2626
test:
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
3030
- uses: cachix/install-nix-action@v31
3131
with:
3232
nix_path: nixpkgs=channel:nixos-unstable
3333

34+
- uses: Swatinem/rust-cache@v2
35+
with:
36+
cache-all-crates: "true"
37+
cache-on-failure: "true"
38+
save-if: ${{ github.ref == 'refs/heads/main' }}
3439
- name: Test
3540
run: nix develop --command bash -c "yarn install && yarn test"

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
"browserslist": "> 0.5%, last 2 versions, not dead",
55
"license": "GPL-3.0-or-later",
66
"scripts": {
7-
"start": "concurrently 'npm:start-web' 'npm:start-e2e'",
7+
"start": "concurrently 'yarn:start-web' 'yarn:start-e2e'",
88
"build": "webpack build --mode production && tailwindcss --input static/css/main.css --output static/main.build.css --minify",
99

10-
"test": "cargo test --color always --features kube && concurrently --kill-others 'npm:start-e2e' 'npm:test-e2e'",
10+
"test": "cargo test --color always --features kube && concurrently --kill-others 'yarn:start-e2e' 'yarn:test-e2e'",
1111
"test-e2e": "until curl -sSf http://localhost:8080 >/dev/null; do sleep 1; done; hurl --test --jobs 1 ./hurl",
1212
"test-server": "cargo test --color always --features e2e-test",
1313

14-
"start-web": "concurrently 'npm:tailwind-dev' 'npm:webpack-dev'",
14+
"start-web": "concurrently --name tailwind,webpack 'yarn:tailwind-dev' 'yarn:webpack-dev'",
1515
"tailwind-dev": "tailwindcss --input static/css/main.css --output static/main.build.css --watch",
1616
"webpack-dev": "webpack watch --mode development",
1717

18-
"start-e2e": "concurrently 'npm:start-server' 'npm:e2e-server'",
18+
"start-e2e": "concurrently --name magicentry,dummy --kill-others 'yarn:start-server' 'yarn:e2e-server'",
1919
"start-server": "RUST_LOG_STYLE=always CONFIG_FILE=config.sample.yaml watchexec --debounce 2 --watch ./Cargo.toml --watch ./src --watch ./static --watch ./benches --restart cargo run --color always --features e2e-test",
2020
"start-test": "RUST_LOG_STYLE=always watchexec --debounce 2 --watch ./Cargo.toml --watch ./src --watch ./static --watch ./benches --restart cargo test --color always --features kube",
2121
"e2e-server": "http-server hurl -p 8081",

0 commit comments

Comments
 (0)