Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update of files from global .github repo #222

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
shell: bash
- if: steps.should_run.outputs.shouldrun == 'true'
name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- if: steps.should_run.outputs.shouldrun == 'true'
name: Check if Node.js project and has package.json
id: packagejson
Expand All @@ -53,27 +54,26 @@ jobs:
id: lockversion
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
#npm cli 10 is buggy because of some cache issue
name: Install npm cli 8
shell: bash
run: npm install -g npm@8.19.4
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
id: first-installation
shell: bash
run: npm ci
continue-on-error: true
- if: steps.first-installation.outcome != 'success' && steps.packagejson.outputs.exists == 'true'
name: Clear NPM cache and install deps again
run: |
npm cache clean --force
npm ci
- if: steps.packagejson.outputs.exists == 'true'
name: Test
run: npm test --if-present
- if: steps.packagejson.outputs.exists == 'true'
- if: steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest'
#linting should run just one and not on all possible operating systems
name: Run linter
run: npm run lint --if-present
- if: steps.packagejson.outputs.exists == 'true'
name: Run release assets generation to make sure PR does not break it
shell: bash
run: npm run generate:assets --if-present
31 changes: 14 additions & 17 deletions .github/workflows/if-nodejs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
shell: bash
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check if Node.js project and has package.json
id: packagejson
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
Expand All @@ -50,14 +51,18 @@ jobs:
id: lockversion
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
name: Install npm cli 8
shell: bash
#npm cli 10 is buggy because of some cache issues
run: npm install -g npm@8.19.4
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
run: npm install
shell: bash
run: npm ci
- if: steps.packagejson.outputs.exists == 'true'
name: Run test
run: npm test --if-present
Expand All @@ -81,7 +86,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check if Node.js project and has package.json
id: packagejson
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
Expand All @@ -92,21 +97,13 @@ jobs:
id: lockversion
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
id: first-installation
shell: bash
run: npm ci
continue-on-error: true
- if: steps.first-installation.outcome != 'success' && steps.packagejson.outputs.exists == 'true'
name: Clear NPM cache and install deps again
run: |
npm cache clean --force
npm ci
- if: steps.packagejson.outputs.exists == 'true'
name: Add plugin for conventional commits for semantic-release
run: npm install --save-dev conventional-changelog-conventionalcommits@5.0.0
Expand All @@ -131,4 +128,4 @@ jobs:
fields: repo,action,workflow
text: 'Release workflow failed in release job'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
Loading