-
Notifications
You must be signed in to change notification settings - Fork 81
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
chore: have CI for tests across all Os's (manual) while default CI ru… #878
Merged
danielpeintner
merged 3 commits into
eclipse-thingweb:master
from
danielpeintner:split-ci-actions
Nov 29, 2022
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Full CI Pipeline | ||
|
||
on: workflow_dispatch | ||
jobs: | ||
setup-and-test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
node-version: [14.x, 16.x, 18.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.os }} ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- name: npm 7 | ||
# npm workspaces requires npm v7 or higher | ||
run: npm i -g npm@7 --registry=https://registry.npmjs.org | ||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test with coverage report | ||
run: npm run coverage:only | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v2 | ||
|
||
eslint: | ||
name: eslint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
|
||
- name: npm 7 | ||
# npm workspaces requires npm v7 or higher | ||
run: npm i -g npm@7 --registry=https://registry.npmjs.org | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
version_consistency: | ||
name: Check version consistency of packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: install node v14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- name: verify packages version consistency accross sub-modules | ||
run: npm run check:versions | ||
|
||
prettier: | ||
name: Check coding style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actionsx/prettier@v2 | ||
with: | ||
args: --check . |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could also let the full CI pipeline only run for changes on the main branch instead? This way it does not slow down progress in PRs but still uncovers OS-specific errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment the full test is not run automatically. Hence one needs to trigger it manually. When doing so once can usually select the branch it should run this action.. this is at least how I have been seeing this working.
Do you mean something else ?
Do you mean we should use
on: [push]
only and removepull_request
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, that is what I meant :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense in general! At the moment I would stick to manually triggering because we have issue with
macos_latest
andwindows_latest
which we need to solve first.@relu91 any thoughts?