From 9c134ac4e8cdd3766970c76f97a56bce77a07605 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:26:28 +0800 Subject: [PATCH 1/7] Update main.yml --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8dfa0e0d..fef179fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -112,6 +112,11 @@ jobs: key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - name: coverage - run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash) + run: npm test -- --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} needs: setup From 23a70cb2c1417b4416591370e47de5431889029d Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:34:23 +0800 Subject: [PATCH 2/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fef179fc..8002dbfb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -116,7 +116,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 - with: + with: token: ${{ secrets.CODECOV_TOKEN }} needs: setup From fc0aeb0acb03ae93cdabc9be379411a2c91ae779 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:38:01 +0800 Subject: [PATCH 3/7] Update main.yml --- .github/workflows/main.yml | 47 ++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8002dbfb..112beded 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,29 +2,29 @@ name: CI on: push: - branches: [master] + branches: [ master ] pull_request: - branches: [master] + branches: [ master ] jobs: setup: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: 20 - name: cache package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: create package-lock.json - run: npm i --package-lock-only --ignore-scripts + run: npm i --package-lock-only - name: hack for singe file run: | @@ -35,29 +35,29 @@ jobs: - name: cache node_modules id: node_modules_cache_id - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - name: install if: steps.node_modules_cache_id.outputs.cache-hit != 'true' - run: npm ci - + run: npm i + lint: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -65,25 +65,22 @@ jobs: - name: lint run: npm run lint - - name: ts check - run: npm run tsc - needs: setup - + compile: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -92,27 +89,27 @@ jobs: run: npm run compile needs: setup - + coverage: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - name: coverage - run: npm test -- --coverage + run: npm run coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From f76ce26399b9d04791c408e19209d1de4576ab06 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:38:30 +0800 Subject: [PATCH 4/7] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 112beded..1190f8f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,8 +42,8 @@ jobs: - name: install if: steps.node_modules_cache_id.outputs.cache-hit != 'true' - run: npm i - + run: npm ci + lint: runs-on: ubuntu-latest steps: From d5297935518c5572b466adaafdb2982208a60a18 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:39:50 +0800 Subject: [PATCH 5/7] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1190f8f2..e251f312 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,6 +65,8 @@ jobs: - name: lint run: npm run lint + - name: ts check + run: npm run tsc needs: setup compile: From 0a8827178f10e01e02c2732c239da17079e720b0 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:43:33 +0800 Subject: [PATCH 6/7] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e251f312..c745d305 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: key: lock-${{ github.sha }} - name: create package-lock.json - run: npm i --package-lock-only + run: npm i --package-lock-only --ignore-scripts - name: hack for singe file run: | From c40b4a7ccbade45e86a77ccb106fa9f0b0014a6f Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Aug 2024 22:50:15 +0800 Subject: [PATCH 7/7] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c745d305..87c77357 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -111,7 +111,7 @@ jobs: key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} - name: coverage - run: npm run coverage + run: npm test -- --coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v4