diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 057fc3b643..ff2eb0afcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,8 +59,30 @@ jobs: - run: yarn install --frozen-lockfile - run: yarn tsc + changes: + runs-on: ubuntu-latest + outputs: + server: ${{ steps.filter.outputs.server }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + server: + - 'server/**' + - 'shared/**' + - 'package.json' + - 'yarn.lock' + app: + - 'app/**' + - 'shared/**' + - 'package.json' + - 'yarn.lock' + test: needs: build + if: ${{ needs.changes.outputs.app == 'true' }} runs-on: ubuntu-latest strategy: matrix: @@ -75,7 +97,8 @@ jobs: - run: yarn test:${{ matrix.test-group }} test-server: - needs: build + needs: [build, changes] + if: ${{ needs.changes.outputs.server == 'true' }} runs-on: ubuntu-latest services: postgres: @@ -121,6 +144,7 @@ jobs: bundle-size: needs: [build, types] + if: ${{ needs.changes.outputs.app == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 927291efba..9b410ac7e8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,7 +11,7 @@ env: jobs: build-and-push: - runs-on: ubuntu-latest-16-cores + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4