From f6b3e8fea65d8ef8cb6c6e50599d37cd9dffbf62 Mon Sep 17 00:00:00 2001 From: Dor Shtaif Date: Thu, 6 Feb 2025 13:05:43 +0200 Subject: [PATCH 1/2] separate the current combined GH workflow into individual ones per job like it used to be because so `README.md` badges can reference these individually and specifically --- .github/workflows/ci-lint-check.yaml | 18 +++++ .github/workflows/ci-prettier-check.yaml | 18 +++++ .../workflows/ci-run-tests-type-check.yaml | 18 +++++ .github/workflows/ci-run-tests.yaml | 18 +++++ .github/workflows/ci-ts-build-check.yaml | 18 +++++ .github/workflows/ci.yaml | 68 ------------------- README.md | 4 +- 7 files changed, 92 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/ci-lint-check.yaml create mode 100644 .github/workflows/ci-prettier-check.yaml create mode 100644 .github/workflows/ci-run-tests-type-check.yaml create mode 100644 .github/workflows/ci-run-tests.yaml create mode 100644 .github/workflows/ci-ts-build-check.yaml delete mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci-lint-check.yaml b/.github/workflows/ci-lint-check.yaml new file mode 100644 index 0000000..baed9db --- /dev/null +++ b/.github/workflows/ci-lint-check.yaml @@ -0,0 +1,18 @@ +name: CI + +on: + pull_request: + branches: [master] + +jobs: + lint_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/ci-common-setup + + - name: Lint check + run: pnpm exec eslint --cache diff --git a/.github/workflows/ci-prettier-check.yaml b/.github/workflows/ci-prettier-check.yaml new file mode 100644 index 0000000..4ce518e --- /dev/null +++ b/.github/workflows/ci-prettier-check.yaml @@ -0,0 +1,18 @@ +name: CI + +on: + pull_request: + branches: [master] + +jobs: + prettier_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/ci-common-setup + + - name: Prettier check + run: pnpm exec prettier --check "./{src,spec}/**/*.{ts,tsx,js,mjs,jsx}" diff --git a/.github/workflows/ci-run-tests-type-check.yaml b/.github/workflows/ci-run-tests-type-check.yaml new file mode 100644 index 0000000..1d144b3 --- /dev/null +++ b/.github/workflows/ci-run-tests-type-check.yaml @@ -0,0 +1,18 @@ +name: CI + +on: + pull_request: + branches: [master] + +jobs: + run_tests_type_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/ci-common-setup-locally-packaged + + - name: Type-check tests code + run: pnpm run test-typings-check diff --git a/.github/workflows/ci-run-tests.yaml b/.github/workflows/ci-run-tests.yaml new file mode 100644 index 0000000..55dc205 --- /dev/null +++ b/.github/workflows/ci-run-tests.yaml @@ -0,0 +1,18 @@ +name: CI + +on: + pull_request: + branches: [master] + +jobs: + run_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/ci-common-setup-locally-packaged + + - name: Run tests against packaged library code + run: pnpm test diff --git a/.github/workflows/ci-ts-build-check.yaml b/.github/workflows/ci-ts-build-check.yaml new file mode 100644 index 0000000..8b7c1ad --- /dev/null +++ b/.github/workflows/ci-ts-build-check.yaml @@ -0,0 +1,18 @@ +name: CI + +on: + pull_request: + branches: [master] + +jobs: + ts_build_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/ci-common-setup + + - name: TypeScript test build + run: pnpm run build-check diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index f7911c8..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: CI - -on: - pull_request: - branches: [master] - -jobs: - lint_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - - uses: ./.github/actions/ci-common-setup - - - name: Lint check - run: pnpm exec eslint --cache - - prettier_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - - uses: ./.github/actions/ci-common-setup - - - name: Prettier check - run: pnpm exec prettier --check "./{src,spec}/**/*.{ts,tsx,js,mjs,jsx}" - - ts_build_test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - - uses: ./.github/actions/ci-common-setup - - - name: TypeScript test build - run: pnpm run build-check - - run_tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - - uses: ./.github/actions/ci-common-setup-locally-packaged - - - name: Run tests against packaged library code - run: | - pnpm test - - run_type_check_on_tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - - uses: ./.github/actions/ci-common-setup-locally-packaged - - - name: Type-check tests code - run: | - pnpm run test-typings-check diff --git a/README.md b/README.md index d8bdb22..c91d14a 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ npm published version - + Tests status - + Build status semantic-release From 974487d30da49e2b4e0d0ee5d11b24b69a7ebe98 Mon Sep 17 00:00:00 2001 From: Dor Shtaif Date: Thu, 6 Feb 2025 13:17:35 +0200 Subject: [PATCH 2/2] more specific name field in each workflow --- .github/workflows/ci-lint-check.yaml | 2 +- .github/workflows/ci-prettier-check.yaml | 2 +- .github/workflows/ci-run-tests-type-check.yaml | 4 ++-- .github/workflows/ci-run-tests.yaml | 4 ++-- .github/workflows/ci-ts-build-check.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-lint-check.yaml b/.github/workflows/ci-lint-check.yaml index baed9db..c51998c 100644 --- a/.github/workflows/ci-lint-check.yaml +++ b/.github/workflows/ci-lint-check.yaml @@ -1,4 +1,4 @@ -name: CI +name: CI - lint check on: pull_request: diff --git a/.github/workflows/ci-prettier-check.yaml b/.github/workflows/ci-prettier-check.yaml index 4ce518e..3e3a58d 100644 --- a/.github/workflows/ci-prettier-check.yaml +++ b/.github/workflows/ci-prettier-check.yaml @@ -1,4 +1,4 @@ -name: CI +name: CI - prettier check on: pull_request: diff --git a/.github/workflows/ci-run-tests-type-check.yaml b/.github/workflows/ci-run-tests-type-check.yaml index 1d144b3..43e62f2 100644 --- a/.github/workflows/ci-run-tests-type-check.yaml +++ b/.github/workflows/ci-run-tests-type-check.yaml @@ -1,4 +1,4 @@ -name: CI +name: CI - run tests type check on: pull_request: @@ -14,5 +14,5 @@ jobs: - uses: ./.github/actions/ci-common-setup-locally-packaged - - name: Type-check tests code + - name: Type-check tests code against packaged build run: pnpm run test-typings-check diff --git a/.github/workflows/ci-run-tests.yaml b/.github/workflows/ci-run-tests.yaml index 55dc205..420a902 100644 --- a/.github/workflows/ci-run-tests.yaml +++ b/.github/workflows/ci-run-tests.yaml @@ -1,4 +1,4 @@ -name: CI +name: CI - run tests on: pull_request: @@ -14,5 +14,5 @@ jobs: - uses: ./.github/actions/ci-common-setup-locally-packaged - - name: Run tests against packaged library code + - name: Run tests against packaged build run: pnpm test diff --git a/.github/workflows/ci-ts-build-check.yaml b/.github/workflows/ci-ts-build-check.yaml index 8b7c1ad..76da727 100644 --- a/.github/workflows/ci-ts-build-check.yaml +++ b/.github/workflows/ci-ts-build-check.yaml @@ -1,4 +1,4 @@ -name: CI +name: CI - ts build check on: pull_request: