From 13eea5cd135e375845eb6d55610ac79dda8df77d Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 18:19:35 +0100 Subject: [PATCH 01/12] ci: move to github actions --- .github/workflows/review.yml | 52 ++++++++++++++++++++++++++++++++++++ .travis.yml | 17 ------------ 2 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/review.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml new file mode 100644 index 0000000..d510520 --- /dev/null +++ b/.github/workflows/review.yml @@ -0,0 +1,52 @@ +on: + - push + - pull_request + +jobs: + cache-and-install: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Format + run: pnpm format:check + + - name: Lint + run: pnpm format:check + + - name: Tests + run: pnpm test + + - name: Coverage + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f0460e2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: 18 -cache: - npm: false - directories: - - "~/.pnpm-store" -before_install: - - curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7 - - pnpm config set store-dir ~/.pnpm-store -install: - - pnpm install -script: - - pnpm format:check - - pnpm lint - - pnpm test -after_success: - - npx codecov From 232556dd57915d17cc3c3e55b38c4998a4fed184 Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 18:20:53 +0100 Subject: [PATCH 02/12] ci: add concurrency --- .github/workflows/review.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index d510520..4253b4a 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -2,6 +2,10 @@ on: - push - pull_request +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: cache-and-install: runs-on: ubuntu-latest From 474f9c54bdd22fe61f7a5816f67bb1c4b29ff1fa Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 18:22:33 +0100 Subject: [PATCH 03/12] ci: set correct node version --- .github/workflows/review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 4253b4a..60c8785 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -17,7 +17,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - uses: pnpm/action-setup@v2 name: Install pnpm From 95d053bbc752b5d48bbb203b9ee723aed554662f Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 18:23:52 +0100 Subject: [PATCH 04/12] package: update lock file --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1754369..2d2d24c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: 5.4 specifiers: - '@vitest/coverage-c8': ^0.26.2 + '@vitest/coverage-c8': 0.26.2 eslint-config-unicorn-camelcase: 0.1.1 flux-standard-action: 2.1.2 husky: 8.0.2 From 3b34b268a65234c934fdadf954087f300aba5916 Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 18:28:01 +0100 Subject: [PATCH 05/12] ci: update review workflow --- .github/workflows/review.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 60c8785..f0acf05 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -1,5 +1,4 @@ on: - - push - pull_request concurrency: @@ -53,4 +52,7 @@ jobs: run: pnpm test - name: Coverage - uses: codecov/codecov-action@v3 \ No newline at end of file + uses: codecov/codecov-action@v3 + + - name: Build + run: pnpm build \ No newline at end of file From 497e5dc3e8471558e6cd64213d47178725ff7d60 Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 19:12:44 +0100 Subject: [PATCH 06/12] ci: add publish flow --- .github/workflows/publish.yml | 64 +++++++++++++++++++++++++++++++++++ .github/workflows/push.yml | 51 ++++++++++++++++++++++++++++ .github/workflows/review.yml | 3 +- 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..cdcf2d2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,64 @@ +name: Version and Release + +on: + workflow_dispatch: + inputs: + newversion: + description: 'Version' + required: true + +concurrency: + group: npm-bump + cancel-in-progress: true + +jobs: + version_and_release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Tests + run: pnpm test + + - name: Version and publish to npm + uses: bcomnes/npm-bump@v2 + with: + git_email: bcomnes@gmail.com + git_username: ${{ github.actor }} + newversion: ${{ github.event.inputs.newversion }} + push_version_commit: true + github_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..ff85c5f --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,51 @@ +on: + push: + branches: [ master ] + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + push: + name: Push + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Tests + run: pnpm test + + - name: Coverage + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index f0acf05..be72073 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -6,7 +6,8 @@ concurrency: cancel-in-progress: true jobs: - cache-and-install: + review: + name: Review runs-on: ubuntu-latest steps: From a981e0adcad198abd4871355518248f86fb03d40 Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 19:12:50 +0100 Subject: [PATCH 07/12] 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e28644..5ab439b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-actions", - "version": "2.7.0", + "version": "3.0.0", "description": "Flux Standard Action utlities for Redux", "type": "module", "scripts": { From c216566f3317a165fea4b6d3e0ab883782ebcfcd Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Sun, 22 Jan 2023 19:13:34 +0100 Subject: [PATCH 08/12] chore: roll back version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ab439b..3e28644 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-actions", - "version": "3.0.0", + "version": "2.7.0", "description": "Flux Standard Action utlities for Redux", "type": "module", "scripts": { From 1ac29c7a5431c5cf43fe22a7d56f751b3228da8b Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Mon, 23 Jan 2023 19:33:21 +0100 Subject: [PATCH 09/12] ci: consolidate github workflows --- .github/workflows/push.yml | 51 ------------------------------------ .github/workflows/review.yml | 4 ++- 2 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index ff85c5f..0000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,51 +0,0 @@ -on: - push: - branches: [ master ] - -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - -jobs: - push: - name: Push - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - id: pnpm-install - with: - version: 7 - run_install: false - - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm install - - - name: Tests - run: pnpm test - - - name: Coverage - uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index be72073..af5552f 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -1,5 +1,7 @@ on: - - pull_request + pull_request: + push: + branches: [ master ] concurrency: group: ${{ github.ref }} From 0ce8cb3e7087e2273749a4e19c5f26aaaafc4f56 Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Thu, 26 Jan 2023 19:52:00 +0100 Subject: [PATCH 10/12] chore: add review suggestions --- .github/workflows/publish.yml | 31 ++++------------------ .github/workflows/review.yml | 48 ++++++++--------------------------- 2 files changed, 15 insertions(+), 64 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cdcf2d2..72d114a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,46 +15,25 @@ jobs: version_and_release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install Node.js - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 18 registry-url: 'https://registry.npmjs.org' - uses: pnpm/action-setup@v2 - name: Install pnpm id: pnpm-install with: version: 7 - run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + - run: pnpm install - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm install - - - name: Tests - run: pnpm test + - run: pnpm test - - name: Version and publish to npm - uses: bcomnes/npm-bump@v2 + - uses: bcomnes/npm-bump@v2 with: git_email: bcomnes@gmail.com git_username: ${{ github.actor }} diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index af5552f..e643a1d 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -1,61 +1,33 @@ +name: CI on: pull_request: push: branches: [ master ] -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - jobs: - review: - name: Review + test: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Install Node.js - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - uses: pnpm/action-setup@v2 - name: Install pnpm id: pnpm-install with: version: 7 - run_install: false - - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - name: Install dependencies - run: pnpm install + - run: pnpm install - - name: Format - run: pnpm format:check + - run: pnpm format:check - - name: Lint - run: pnpm format:check + - run: pnpm format:check - - name: Tests - run: pnpm test + - run: pnpm test - - name: Coverage - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v3 - - name: Build - run: pnpm build \ No newline at end of file + - run: pnpm build \ No newline at end of file From 2d37795717182e18d3be352e77913e59fcd4f2ec Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Thu, 26 Jan 2023 19:55:00 +0100 Subject: [PATCH 11/12] chore: add review suggestions --- .github/workflows/{review.yml => main.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{review.yml => main.yml} (100%) diff --git a/.github/workflows/review.yml b/.github/workflows/main.yml similarity index 100% rename from .github/workflows/review.yml rename to .github/workflows/main.yml From 7dc3da8a0fda4fb60730a95b9acadac6e602de39 Mon Sep 17 00:00:00 2001 From: Alexander Heimbuch <github@heimbu.ch> Date: Fri, 27 Jan 2023 17:30:35 +0100 Subject: [PATCH 12/12] chore: add review suggestions --- .github/workflows/main.yml | 3 +-- .github/workflows/publish.yml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e643a1d..a548558 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,6 @@ jobs: node-version: 18 - uses: pnpm/action-setup@v2 - id: pnpm-install with: version: 7 @@ -24,7 +23,7 @@ jobs: - run: pnpm format:check - - run: pnpm format:check + - run: pnpm lint - run: pnpm test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 72d114a..d26b7a1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,8 +35,8 @@ jobs: - uses: bcomnes/npm-bump@v2 with: - git_email: bcomnes@gmail.com - git_username: ${{ github.actor }} + git_email: github-actions@github.com + git_username: github-actions newversion: ${{ github.event.inputs.newversion }} push_version_commit: true github_token: ${{ secrets.GITHUB_TOKEN }}