Skip to content

Commit

Permalink
Merge pull request #1861 from serlo/99Bdv-kulla-2025-01-26-22-37
Browse files Browse the repository at this point in the history
chore(yarn): Remove zero-install
  • Loading branch information
kulla authored Jan 26, 2025
2 parents 479aa97 + 4dd5d9c commit 519b778
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 18 deletions.
23 changes: 23 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Setup repository for CI tests
runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash

- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --immutable
shell: bash
17 changes: 5 additions & 12 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,33 @@ on:
pull_request:
merge_group:
jobs:
yarn:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- run: yarn --check-cache

eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- run: yarn lint:eslint

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- run: yarn lint:prettier

tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- run: yarn lint:tsc

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-mysql@main
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- run: yarn start:containers
- run: scripts/mysql/wait-for-mysql.sh
- run: yarn migrate:all
Expand All @@ -54,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- run: yarn codegen
- name: Check for uncommitted changes
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build-args: |
image=${{ matrix.image }}
tags: api-${{ matrix.image }}-local-build:latest
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- name: Start containers
run: yarn start:containers
- name: Wait until all containers are ready
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-migration-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4
- uses: serlo/configure-repositories/actions/setup-node@main
- uses: ./.github/actions/setup-node
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ dist/
.idea
.vscode

# Yarn (with Zero-Installs)
# Yarn (without PnP and zero-installs)
.pnp.*
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
Expand Down
2 changes: 1 addition & 1 deletion packages/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY lerna.json .
COPY yarn.lock .

FROM base AS build_dist
RUN yarn --immutable --immutable-cache --silent
RUN yarn --immutable --silent
COPY packages/authorization packages/authorization
COPY packages/server packages/server
RUN yarn build:${image}
Expand Down

0 comments on commit 519b778

Please sign in to comment.