From a2ff2bbc1a4e66bfa23104fada23a8106b4c7e96 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 18:25:37 +0100 Subject: [PATCH 01/15] wip: starting --- templates/workflow-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/workflow-template.yaml b/templates/workflow-template.yaml index ea70802..6db821a 100644 --- a/templates/workflow-template.yaml +++ b/templates/workflow-template.yaml @@ -4,4 +4,4 @@ jobs: example-job: runs-on: # system - https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories steps: - - run: echo "Hello, World!" + - run: echo "Hello, World2!" From ab3809d4252909f6cff851a323c0e6fcd7b968a6 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 18:36:36 +0100 Subject: [PATCH 02/15] task 1 wip --- .github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++ .idea/.gitignore | 8 ++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ github-actions-kata.iml | 9 +++++++++ 6 files changed, 55 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 github-actions-kata.iml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..15a61d6 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e4d3c74 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/github-actions-kata.iml b/github-actions-kata.iml new file mode 100644 index 0000000..8021953 --- /dev/null +++ b/github-actions-kata.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file From 6fec0b2f8c5d38ef18f6c9ca1d78bfcd195a0cad Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 18:47:32 +0100 Subject: [PATCH 03/15] task 1 wip 2 --- .github/workflows/github-actions-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 15a61d6..3178730 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -15,4 +15,4 @@ jobs: - name: List files in the repository run: | ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + - run: echo "🍏 This job's status is really ${{ job.status }}." From 6ad23fa6d2e1cf4ce389605b484b828d28f4f2a8 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 19:10:10 +0100 Subject: [PATCH 04/15] task 2 --- .github/workflows/github-actions-demo.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 3178730..d9f381e 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,6 +1,6 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [push] +on: [pull_request] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -10,9 +10,6 @@ jobs: - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} + - run: npm install + - run: npm test - run: echo "🍏 This job's status is really ${{ job.status }}." From 7cbd071af36cb3a52db66c6113c089c3470740d4 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 19:48:23 +0100 Subject: [PATCH 05/15] task 2 with cd --- .github/workflows/github-actions-demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index d9f381e..ed8c94a 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -10,6 +10,6 @@ jobs: - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - run: npm install - - run: npm test + - run: cd desktop-app && npm install + - run: cd desktop-app && npm test - run: echo "🍏 This job's status is really ${{ job.status }}." From 755b31a025c20e56ca178fbb7d956c17445f666a Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 19:54:07 +0100 Subject: [PATCH 06/15] task 2 with +c --- desktop-app/src/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-app/src/utils/index.ts b/desktop-app/src/utils/index.ts index e168c95..bc7abed 100644 --- a/desktop-app/src/utils/index.ts +++ b/desktop-app/src/utils/index.ts @@ -1,4 +1,4 @@ // @ts-ignore export function sum(a: number, b: number, c: number | undefined = undefined) { - return a + b; + return a + b + c; } From bd5ffdccf444b4621c119712d0dbb6cbf87a1a10 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:00:51 +0100 Subject: [PATCH 07/15] task 2 with +c??0 --- desktop-app/src/utils/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop-app/src/utils/index.ts b/desktop-app/src/utils/index.ts index bc7abed..81caad7 100644 --- a/desktop-app/src/utils/index.ts +++ b/desktop-app/src/utils/index.ts @@ -1,4 +1,3 @@ -// @ts-ignore export function sum(a: number, b: number, c: number | undefined = undefined) { - return a + b + c; + return a + b + (c ?? 0); } From 9fdc1d3d730eacefac480cf6232ecb7cc700e368 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:13:21 +0100 Subject: [PATCH 08/15] task 2 with cache with path --- .github/workflows/github-actions-demo.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index ed8c94a..6a32bf2 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -10,6 +10,11 @@ jobs: - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: 'desktop-app/package-lock.json' - run: cd desktop-app && npm install - run: cd desktop-app && npm test - run: echo "🍏 This job's status is really ${{ job.status }}." From 2b5d25fe33b31c6612aebc9252e00bf6fca95e49 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:17:45 +0100 Subject: [PATCH 09/15] task 2 with cache with path 2 --- .github/workflows/github-actions-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 6a32bf2..5d8ec10 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '20.11.1' cache: 'npm' cache-dependency-path: 'desktop-app/package-lock.json' - run: cd desktop-app && npm install From 19172eec07ca4c57f5859793e95348a5acb47157 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:25:43 +0100 Subject: [PATCH 10/15] task 2 with cache with path ts only in correct path --- .github/workflows/github-actions-demo.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 5d8ec10..84311b6 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,6 +1,8 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [pull_request] +paths: + - 'desktop-app/**.ts' jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -17,4 +19,7 @@ jobs: cache-dependency-path: 'desktop-app/package-lock.json' - run: cd desktop-app && npm install - run: cd desktop-app && npm test + with: + filetype: ts + - run: echo "🍏 This job's status is really ${{ job.status }}." From fcde2c5c7263a438c474cb342e228d5810854a0b Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:30:03 +0100 Subject: [PATCH 11/15] task 2 with cache with path ts only in correct path --- .github/workflows/github-actions-demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 84311b6..6dbf705 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,8 +1,8 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [pull_request] -paths: - - 'desktop-app/**.ts' + paths: + - 'desktop-app/**.ts' jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest From a5e70da5bbfc97a9db40b9a2b9c48738c35fe28c Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:31:40 +0100 Subject: [PATCH 12/15] task 2 with cache with path ts only in correct path --- .github/workflows/github-actions-demo.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 6dbf705..0859b90 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,8 +1,9 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [pull_request] - paths: - - 'desktop-app/**.ts' +on: + pull_request: + paths: + - 'desktop-app/**.ts' jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest From 2a8c8cf36445a39d861b45d2ff9834f03f9721cc Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:32:51 +0100 Subject: [PATCH 13/15] task 2 with cache with path ts only in correct path --- .github/workflows/github-actions-demo.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 0859b90..e0c814d 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -20,7 +20,4 @@ jobs: cache-dependency-path: 'desktop-app/package-lock.json' - run: cd desktop-app && npm install - run: cd desktop-app && npm test - with: - filetype: ts - - run: echo "🍏 This job's status is really ${{ job.status }}." From 9aa4944e04f7f2b77cda591b018fb074ff170eb9 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:36:19 +0100 Subject: [PATCH 14/15] n --- desktop-app/src/App.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop-app/src/App.css b/desktop-app/src/App.css index e69de29..f54ce37 100644 --- a/desktop-app/src/App.css +++ b/desktop-app/src/App.css @@ -0,0 +1,4 @@ +p { + color: red; + text-align: center; +} From 5aa302d8ea3e27abd2e14d53d384da20f287e4d2 Mon Sep 17 00:00:00 2001 From: Gerhard Katstaller Date: Tue, 19 Mar 2024 20:40:56 +0100 Subject: [PATCH 15/15] not red --- desktop-app/src/App.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-app/src/App.css b/desktop-app/src/App.css index f54ce37..8989443 100644 --- a/desktop-app/src/App.css +++ b/desktop-app/src/App.css @@ -1,4 +1,4 @@ p { - color: red; + color: green; text-align: center; }