From 9b2036f0c5f4daad6f321e51197e0ea66e81470c Mon Sep 17 00:00:00 2001 From: Dirk de Visser Date: Fri, 9 Feb 2024 17:04:28 +0100 Subject: [PATCH 1/4] chore(ci): add workflows Signed-off-by: Dirk de Visser --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b68ef77 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: Build, Lint, Test + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: truew + +jobs: + build_lint_test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + # Can't cache, since we don't commit the lockfile + node-version: 20 + + # Execute build multiple times if it fails. We haven't correctly set up correct composed package builds, so initial builds may fail + - name: "Build" + uses: nick-fields/retry@v3.0.0 + with: + max_attempts: 5 + timeout_minutes: 15 + retry_on: error + command: npm run build:ws + + - name: "Lint" + run: | + npm run lint:ci:ws + + - name: "Test" + run: | + npm run test:ws + + check-licenses: + uses: lightbasenl/platforms/.github/workflows/lib-license-checker.yml@main + with: + envs: + ACC: + environment_variables: + TENANT_ORIGIN: foo.bar.com From 459ac23dccc3058c931553d5439350cd9b17b769 Mon Sep 17 00:00:00 2001 From: Dirk de Visser Date: Fri, 9 Feb 2024 17:11:19 +0100 Subject: [PATCH 2/4] chore: fix typo Signed-off-by: Dirk de Visser --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b68ef77..81dd60d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: concurrency: group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" - cancel-in-progress: truew + cancel-in-progress: true jobs: build_lint_test: From fb7314acc099015f93c2f2630ea2ece287cae2f2 Mon Sep 17 00:00:00 2001 From: Dirk de Visser Date: Fri, 9 Feb 2024 17:11:55 +0100 Subject: [PATCH 3/4] chore: remove presentation example Signed-off-by: Dirk de Visser --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81dd60d..2335eab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,3 @@ jobs: check-licenses: uses: lightbasenl/platforms/.github/workflows/lib-license-checker.yml@main - with: - envs: - ACC: - environment_variables: - TENANT_ORIGIN: foo.bar.com From 8390bbcac8b43adedeb279974b11afe58a761b04 Mon Sep 17 00:00:00 2001 From: Dirk de Visser Date: Fri, 9 Feb 2024 17:16:37 +0100 Subject: [PATCH 4/4] chore: install dependencies Signed-off-by: Dirk de Visser --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2335eab..aa40c85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true jobs: - build_lint_test: + build-lint-test: runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -24,8 +24,12 @@ jobs: # Can't cache, since we don't commit the lockfile node-version: 20 + - name: Install dependencies + run: | + npm install + # Execute build multiple times if it fails. We haven't correctly set up correct composed package builds, so initial builds may fail - - name: "Build" + - name: Build uses: nick-fields/retry@v3.0.0 with: max_attempts: 5 @@ -33,11 +37,11 @@ jobs: retry_on: error command: npm run build:ws - - name: "Lint" + - name: Lint run: | npm run lint:ci:ws - - name: "Test" + - name: Test run: | npm run test:ws