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

Turbo cache CI integration #242

Merged
merged 2 commits into from
Jan 4, 2025
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
8 changes: 8 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ runs:
- name: Install dependencies
run: pnpm install
shell: bash

- name: Cache turbo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
28 changes: 1 addition & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ jobs:
run: |
echo "gitCommitHash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: ts-build-cache
with:
path: |
./packages/container/libraries/*
./packages/docs/services/*
./packages/docs/tools/*
./packages/foundation/libraries/*
./packages/foundation/tools/*
key: ts-build-${{ steps.get-git-commit-hash.outputs.gitCommitHash }}
restore-keys: |
ts-build-${{ steps.get-git-commit-hash.outputs.gitCommitHash }}

test-package:
name: Test package
needs: build
Expand All @@ -75,21 +62,8 @@ jobs:
run: |
echo "gitCommitHash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: ts-build-cache
with:
path: |
./packages/container/libraries/*
./packages/docs/*"
./packages/foundation/libraries/*
./packages/foundation/tools/*
key: ts-build-${{ steps.get-git-commit-hash.outputs.gitCommitHash }}
restore-keys: |
ts-build-${{ steps.get-git-commit-hash.outputs.gitCommitHash }}

- name: Build on cache miss
- name: Build
run: pnpm run build --filter ${{ join(matrix.packages, ' --filter ') }}
if: ${{ !steps.ts-build-cache.outputs.cache-hit }}

- name: Launch Unit Tests
run: pnpm run test:unit:js --filter ${{ join(matrix.packages, ' --filter ') }} --only
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/collect-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,8 @@ jobs:
run: |
echo "gitCommitHash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: ts-build-cache
with:
path: |
./packages/container/libraries/*
./packages/docs/services/*
./packages/docs/tools/*
./packages/foundation/libraries/*
./packages/foundation/tools/*
key: ts-build-${{ steps.get-git-commit-hash.outputs.gitCommitHash }}
restore-keys: |
ts-build-${{ steps.get-git-commit-hash.outputs.gitCommitHash }}

- name: Build on cache miss
- name: Build
run: pnpm run build --filter ${{ matrix.package }}
if: ${{ !steps.ts-build-cache.outputs.cache-hit }}

- name: Launch Unit Tests and generate coverage report
run: pnpm run test:js:coverage --filter ${{ matrix.package }} --only
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-magic-numbers */
import { jest } from '@jest/globals';

import { Container } from 'inversify';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container, inject, injectable, named, optional } from 'inversify';
import { Container, inject, injectable, optional } from 'inversify';

interface Weapon {
readonly damage: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-magic-numbers */
import { jest } from '@jest/globals';

import { Container, preDestroy } from 'inversify';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container, inject, injectable, named, tagged } from 'inversify';
import { Container, inject, injectable, tagged } from 'inversify';

interface Weapon {
readonly damage: number;
Expand Down
Loading