From 462f93f083405186c9c23a8152fdb14b0cafca90 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Mon, 23 Sep 2024 16:15:51 +0200 Subject: [PATCH 1/6] Chore: update jest action --- .github/workflows/unit-tests.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c05edb1168..312ce9efa3 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,6 +12,11 @@ concurrency: jobs: test: + permissions: + checks: write + pull-requests: read + statuses: write + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,10 +24,6 @@ jobs: - uses: ./.github/workflows/yarn - name: Annotations and coverage report - uses: ArtiomTr/jest-coverage-report-action@v2 - with: - skip-step: install - annotations: failed-tests - package-manager: yarn - test-script: yarn test:ci - github-token: ${{ secrets.GITHUB_TOKEN }} + uses: mattallty/jest-github-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a313315dbaedd41c38691403a310b7d83a380afe Mon Sep 17 00:00:00 2001 From: katspaugh Date: Mon, 23 Sep 2024 16:20:22 +0200 Subject: [PATCH 2/6] Rm permissions --- .github/workflows/unit-tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 312ce9efa3..0bfdd9bd40 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,11 +12,6 @@ concurrency: jobs: test: - permissions: - checks: write - pull-requests: read - statuses: write - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From e88febd94e1be525ba70466fbeba93c59dc5c365 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Mon, 23 Sep 2024 16:25:06 +0200 Subject: [PATCH 3/6] Test failed test --- .../address-book/ImportDialog/__tests__/validation.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/address-book/ImportDialog/__tests__/validation.test.ts b/src/components/address-book/ImportDialog/__tests__/validation.test.ts index 5410f2687e..d134e8ba35 100644 --- a/src/components/address-book/ImportDialog/__tests__/validation.test.ts +++ b/src/components/address-book/ImportDialog/__tests__/validation.test.ts @@ -23,7 +23,7 @@ describe('Address book import validation', () => { size: 1_000_000_000, } as File - expect(abCsvReaderValidator(file)).toEqual(['Address book cannot be larger than 1MB']) + expect(abCsvReaderValidator(file)).toEqual(['FALSE ASSERTION Address book cannot be larger than 1MB']) }) }) describe('hasValidAbHeader', () => { From 68849857e5d114a8d137e342ee5bafaf6a96a119 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Mon, 23 Sep 2024 16:29:50 +0200 Subject: [PATCH 4/6] Another action --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0bfdd9bd40..b4c5493700 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -19,6 +19,6 @@ jobs: - uses: ./.github/workflows/yarn - name: Annotations and coverage report - uses: mattallty/jest-github-action@v1 + uses: willcaul/jest-github-action@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From abeb850d58eb9d18cbb1adc85210770f2b3a8d61 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Tue, 24 Sep 2024 09:26:33 +0200 Subject: [PATCH 5/6] Rm failing test --- .../address-book/ImportDialog/__tests__/validation.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/address-book/ImportDialog/__tests__/validation.test.ts b/src/components/address-book/ImportDialog/__tests__/validation.test.ts index d134e8ba35..5410f2687e 100644 --- a/src/components/address-book/ImportDialog/__tests__/validation.test.ts +++ b/src/components/address-book/ImportDialog/__tests__/validation.test.ts @@ -23,7 +23,7 @@ describe('Address book import validation', () => { size: 1_000_000_000, } as File - expect(abCsvReaderValidator(file)).toEqual(['FALSE ASSERTION Address book cannot be larger than 1MB']) + expect(abCsvReaderValidator(file)).toEqual(['Address book cannot be larger than 1MB']) }) }) describe('hasValidAbHeader', () => { From 13a396795f37eb6318ccd0c6b4957d3447f626aa Mon Sep 17 00:00:00 2001 From: katspaugh Date: Tue, 24 Sep 2024 09:43:48 +0200 Subject: [PATCH 6/6] Permissions --- .github/workflows/unit-tests.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b4c5493700..0eba7e19ce 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,6 +12,11 @@ concurrency: jobs: test: + permissions: + contents: write + checks: write + pull-requests: write + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,6 +24,10 @@ jobs: - uses: ./.github/workflows/yarn - name: Annotations and coverage report - uses: willcaul/jest-github-action@v4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ArtiomTr/jest-coverage-report-action@v2.3.1 + with: + skip-step: install + annotations: failed-tests + package-manager: yarn + test-script: yarn test:ci + github-token: ${{ secrets.GITHUB_TOKEN }}