generated from PrivateAIM/typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from PrivateAIM/feature/28-update-actions-to-s…
…upport-nodejs-20 Feature: update actions to support nodejs 20
- Loading branch information
Showing
5 changed files
with
92 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: 'Build' | ||
description: 'Prepares the repo for a job by running the build' | ||
name: "Build" | ||
description: "Prepares the repo for a job by running the build" | ||
|
||
runs: | ||
using: 'composite' | ||
using: "composite" | ||
steps: | ||
- name: Use cache | ||
id: 'cache' | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/dist/** | ||
**/bin/** | ||
key: ${{ runner.os }}-build-${{ github.sha }} | ||
- name: Use cache | ||
id: "cache" | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
**/dist/** | ||
**/bin/** | ||
key: ${{ runner.os }}-build-${{ github.sha }} | ||
|
||
- name: Build | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
npm run build | ||
- name: Build | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
name: 'Install' | ||
description: 'Prepares the repo for a job by checking out and installing dependencies' | ||
name: "Install" | ||
description: "Prepares the repo for a job by checking out and installing dependencies" | ||
inputs: | ||
node-version: | ||
description: 'The node version to setup' | ||
description: "The node version to setup" | ||
required: true | ||
registry-url: | ||
description: 'Define registry-url' | ||
description: "Define registry-url" | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
using: "composite" | ||
steps: | ||
- name: echo github.ref | ||
shell: bash | ||
run: echo ${{ github.ref }} | ||
- name: echo github.ref | ||
shell: bash | ||
run: echo ${{ github.ref }} | ||
|
||
- name: Use Node.js ${{ inputs.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
registry-url: ${{ inputs.registry-url }} | ||
- name: Use Node.js ${{ inputs.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
registry-url: ${{ inputs.registry-url }} | ||
|
||
- name: Use cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-install-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-install- | ||
- name: Use cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-install-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-install- | ||
- name: Install | ||
shell: bash | ||
run: | | ||
npm ci | ||
- name: Install | ||
shell: bash | ||
run: | | ||
npm ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ permissions: | |
pull-requests: write | ||
|
||
env: | ||
PRIMARY_NODE_VERSION: 18 | ||
PRIMARY_NODE_VERSION: 20 | ||
|
||
jobs: | ||
install: | ||
|
@@ -32,20 +32,20 @@ jobs: | |
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
- name: Lint | ||
run: | | ||
npm run lint | ||
- name: Lint | ||
run: | | ||
npm run lint | ||
build: | ||
name: Build | ||
|
@@ -66,64 +66,64 @@ jobs: | |
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
- name: Run tests | ||
run: | | ||
npm run test | ||
- name: Run tests | ||
run: | | ||
npm run test | ||
release: | ||
name: Release | ||
needs: [lint, tests] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
#- name: Release | ||
#env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# | ||
# run: npx semantic-release | ||
#env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# | ||
# run: npx semantic-release | ||
|
||
coverage: | ||
name: Coverage | ||
needs: [release] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref_name == 'master' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
- name: Coverage | ||
run: | | ||
npm run test:coverage | ||
- name: Coverage | ||
run: | | ||
npm run test:coverage | ||
#- name: Upload report | ||
# uses: codecov/[email protected] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters