From 1efece9db42053d10b90eb1081adc822bc127ec2 Mon Sep 17 00:00:00 2001 From: Henrik Herbst Grubbe Date: Mon, 11 Nov 2024 07:03:10 +0100 Subject: [PATCH 1/5] Sepparate lint and build workflows for app and server --- .../{lint-and-build.yml => lint-and-build-app.yml} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{lint-and-build.yml => lint-and-build-app.yml} (93%) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build-app.yml similarity index 93% rename from .github/workflows/lint-and-build.yml rename to .github/workflows/lint-and-build-app.yml index ecf0226..91dfcd7 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build-app.yml @@ -1,12 +1,12 @@ -name: Lint and build +name: Lint and build app on: pull_request: - branches: - - master + branches: ['master'] + paths: [ '.github/workflows/lint-and-build-app.yml', 'web/app/**' ] jobs: - lint-app: + lint: name: Lint app runs-on: ubuntu-latest defaults: @@ -29,7 +29,7 @@ jobs: - name: Lint run: npm run lint - build-app: + build: name: Build app runs-on: ubuntu-latest defaults: From 2b1809dc5a0b52d220ab80d43043dc24c0a17b66 Mon Sep 17 00:00:00 2001 From: Henrik Herbst Grubbe Date: Mon, 11 Nov 2024 07:03:58 +0100 Subject: [PATCH 2/5] Create lint-and-build-server --- .github/workflows/lint-and-build-server | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/lint-and-build-server diff --git a/.github/workflows/lint-and-build-server b/.github/workflows/lint-and-build-server new file mode 100644 index 0000000..a60322b --- /dev/null +++ b/.github/workflows/lint-and-build-server @@ -0,0 +1,53 @@ +name: Lint and build app + +on: + pull_request: + branches: ['master'] + paths: [ '.github/workflows/lint-and-build-server.yml', 'web/server/**' ] + +jobs: + lint: + name: Lint server + runs-on: ubuntu-latest + defaults: + run: + working-directory: web/server + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Node + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: npm + cache-dependency-path: web/server/package-lock.json + + - name: Dependencies + run: npm ci + + - name: Lint + run: npm run lint + + build: + name: Build server + runs-on: ubuntu-latest + defaults: + run: + working-directory: web/server + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Node + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: npm + cache-dependency-path: web/server/package-lock.json + + - name: Dependencies + run: npm ci + + - name: Build + run: npm run build From 7df97cd116b512dc3839521c7e80c072bd259f5b Mon Sep 17 00:00:00 2001 From: Henrik Herbst Grubbe Date: Mon, 11 Nov 2024 07:04:11 +0100 Subject: [PATCH 3/5] Rename lint-and-build-server to lint-and-build-server.yml --- .../{lint-and-build-server => lint-and-build-server.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{lint-and-build-server => lint-and-build-server.yml} (100%) diff --git a/.github/workflows/lint-and-build-server b/.github/workflows/lint-and-build-server.yml similarity index 100% rename from .github/workflows/lint-and-build-server rename to .github/workflows/lint-and-build-server.yml From 004061cd3a88d6b188712ff2f7098c3e0ba6542e Mon Sep 17 00:00:00 2001 From: Henrik Herbst Grubbe Date: Mon, 11 Nov 2024 07:04:29 +0100 Subject: [PATCH 4/5] Update lint-and-build-server.yml --- .github/workflows/lint-and-build-server.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-and-build-server.yml b/.github/workflows/lint-and-build-server.yml index a60322b..7da1d0e 100644 --- a/.github/workflows/lint-and-build-server.yml +++ b/.github/workflows/lint-and-build-server.yml @@ -1,4 +1,4 @@ -name: Lint and build app +name: Lint and build server on: pull_request: From d0d90695a3f5bc2bb17e0a1f2990a9c84a213f17 Mon Sep 17 00:00:00 2001 From: Henrik Herbst Grubbe Date: Mon, 11 Nov 2024 07:31:34 +0100 Subject: [PATCH 5/5] Update lint-and-build-app.yml --- .github/workflows/lint-and-build-app.yml | 46 ------------------------ 1 file changed, 46 deletions(-) diff --git a/.github/workflows/lint-and-build-app.yml b/.github/workflows/lint-and-build-app.yml index 91dfcd7..0d8c1c6 100644 --- a/.github/workflows/lint-and-build-app.yml +++ b/.github/workflows/lint-and-build-app.yml @@ -51,49 +51,3 @@ jobs: - name: Build run: npm run build - - lint-server: - name: Lint server - runs-on: ubuntu-latest - defaults: - run: - working-directory: web/server - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Node - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: npm - cache-dependency-path: web/server/package-lock.json - - - name: Dependencies - run: npm ci - - - name: Lint - run: npm run lint - - build-server: - name: Build server - runs-on: ubuntu-latest - defaults: - run: - working-directory: web/server - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Node - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: npm - cache-dependency-path: web/server/package-lock.json - - - name: Dependencies - run: npm ci - - - name: Build - run: npm run build