Skip to content

Commit

Permalink
Speed up server CI/CD workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrihogman committed Sep 26, 2024
1 parent 86596e2 commit 5ff762c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/workflow_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ jobs:
with:
node-version-file: .nvmrc

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install
working-directory: ./server-infra
Expand All @@ -66,13 +53,11 @@ jobs:
override: true

- uses: Swatinem/rust-cache@v2
with:
shared-key: waterheater-calc-cache

- name: Build Worker
run: |
pip install cargo-lambda
cargo lambda build --package waterheater-calc --release
cargo lambda build --package waterheater-calc
- uses: pulumi/actions@v5
- run: |
Expand All @@ -84,6 +69,7 @@ jobs:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
deploy_infra:
if: ${{ github.ref_name == 'main' }}
needs: quality_infra
name: Deploy Infra
runs-on: ubuntu-latest
Expand All @@ -103,19 +89,6 @@ jobs:
with:
node-version-file: .nvmrc

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install
working-directory: ./server-infra
Expand All @@ -128,8 +101,6 @@ jobs:
override: true

- uses: Swatinem/rust-cache@v2
with:
shared-key: waterheater-calc-cache

- name: Build Worker
run: |
Expand Down
1 change: 0 additions & 1 deletion server/src/tests/service_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ fn test_get_filtered_pricing_excludes_hours_from_next_day_evening() {
ending_hour,
);

println!("{:?}", filtered_pricing);
assert_eq!(filtered_pricing.len(), 3);
assert_eq!(filtered_pricing[0].date_time.hour(), 22);
assert_eq!(
Expand Down

0 comments on commit 5ff762c

Please sign in to comment.