mirror of
https://github.com/Mintplex-Labs/nut.js.git
synced 2026-07-19 22:15:20 -04:00
(#200) Applied review remarks
This commit is contained in:
@@ -16,8 +16,6 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Setup sonarqube
|
||||
uses: warchant/setup-sonar-scanner@v3
|
||||
- name: Setup Docker
|
||||
run: |
|
||||
docker pull s1hofmann/nut-ci:latest
|
||||
@@ -40,15 +38,11 @@ jobs:
|
||||
run: |
|
||||
npm run coverage:merge
|
||||
npm run coverage:merge-report
|
||||
- name: Run sonarqube
|
||||
- name: Send results to SonarCloud
|
||||
uses: SonarSource/sonarcloud-github-action@v1.4
|
||||
env:
|
||||
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: sonar-scanner
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
||||
-Dsonar.organization=nut-tree
|
||||
-Dsonar.host.url=https://sonarcloud.io/
|
||||
-Dsonar.projectKey=nut-tree:nut.js
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
test:
|
||||
needs:
|
||||
@@ -56,7 +50,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
node: [ 10, 11, 12, 13, 14 ]
|
||||
node: [ 10, 12, 14 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
node: 14
|
||||
@@ -67,7 +61,7 @@ jobs:
|
||||
- name: Set up node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: ${{matrix.node}}
|
||||
- name: Setup Docker
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: |
|
||||
@@ -85,4 +79,4 @@ jobs:
|
||||
run: npm run coverage -- --coverageDirectory=coverage/unit
|
||||
- name: Run Docker E2E tests
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14"
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} ${{matrix.node}}"
|
||||
|
||||
@@ -5,59 +5,13 @@ on:
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Git repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Setup sonarqube
|
||||
uses: warchant/setup-sonar-scanner@v3
|
||||
- name: Setup Docker
|
||||
run: |
|
||||
docker pull s1hofmann/nut-ci:latest
|
||||
docker run -it -d --name nut-ci --shm-size 4gb --user $(id -u):$(id -g) -v ${PWD}:${PWD}:rw s1hofmann/nut-ci:latest bash
|
||||
- name: Install
|
||||
run: npm ci
|
||||
- name: Compile
|
||||
run: npm run compile
|
||||
- name: Init e2e test subpackage
|
||||
run: npm --prefix e2e/tests ci
|
||||
- name: Clean coverage report
|
||||
run: npm run coverage:clean
|
||||
- name: Generate coverage report
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: npm run coverage -- --coverageDirectory=coverage/unit
|
||||
- name: Run Docker E2E tests
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14"
|
||||
- name: Merge coverage reports
|
||||
run: |
|
||||
npm run coverage:merge
|
||||
npm run coverage:merge-report
|
||||
- name: Run sonarqube
|
||||
env:
|
||||
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: sonar-scanner
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
||||
-Dsonar.organization=nut-tree
|
||||
-Dsonar.host.url=https://sonarcloud.io/
|
||||
-Dsonar.projectKey=nut-tree:nut.js
|
||||
|
||||
test:
|
||||
needs:
|
||||
- sonar
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
node: [ 10, 11, 12, 13, 14 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
node: 14
|
||||
node: [ 10, 12, 14 ]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- name: Set up Git repository
|
||||
@@ -65,7 +19,7 @@ jobs:
|
||||
- name: Set up node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: ${{matrix.node}}
|
||||
- name: Setup Docker
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: |
|
||||
@@ -77,13 +31,13 @@ jobs:
|
||||
run: npm run compile
|
||||
- name: Init e2e test subpackage
|
||||
run: npm --prefix e2e/tests ci
|
||||
- name: Generate coverage report
|
||||
- name: Run tests
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: npm run coverage -- --coverageDirectory=coverage/unit
|
||||
run: npm test
|
||||
- name: Run Docker E2E tests
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14"
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} ${{matrix.node}}"
|
||||
|
||||
deploy:
|
||||
needs:
|
||||
|
||||
@@ -5,59 +5,13 @@ on:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Git repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Setup sonarqube
|
||||
uses: warchant/setup-sonar-scanner@v3
|
||||
- name: Setup Docker
|
||||
run: |
|
||||
docker pull s1hofmann/nut-ci:latest
|
||||
docker run -it -d --name nut-ci --shm-size 4gb --user $(id -u):$(id -g) -v ${PWD}:${PWD}:rw s1hofmann/nut-ci:latest bash
|
||||
- name: Install
|
||||
run: npm ci
|
||||
- name: Compile
|
||||
run: npm run compile
|
||||
- name: Init e2e test subpackage
|
||||
run: npm --prefix e2e/tests ci
|
||||
- name: Clean coverage report
|
||||
run: npm run coverage:clean
|
||||
- name: Generate coverage report
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: npm run coverage -- --coverageDirectory=coverage/unit
|
||||
- name: Run Docker E2E tests
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14"
|
||||
- name: Merge coverage reports
|
||||
run: |
|
||||
npm run coverage:merge
|
||||
npm run coverage:merge-report
|
||||
- name: Run sonarqube
|
||||
env:
|
||||
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: sonar-scanner
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
||||
-Dsonar.organization=nut-tree
|
||||
-Dsonar.host.url=https://sonarcloud.io/
|
||||
-Dsonar.projectKey=nut-tree:nut.js
|
||||
|
||||
test:
|
||||
needs:
|
||||
- sonar
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
node: [ 10, 11, 12, 13, 14 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
node: 14
|
||||
node: [ 10, 12, 14 ]
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- name: Set up Git repository
|
||||
@@ -65,7 +19,7 @@ jobs:
|
||||
- name: Set up node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: ${{matrix.node}}
|
||||
- name: Setup Docker
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: |
|
||||
@@ -80,10 +34,10 @@ jobs:
|
||||
- name: Generate coverage report
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: npm run coverage -- --coverageDirectory=coverage/unit
|
||||
run: npm test
|
||||
- name: Run Docker E2E tests
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14"
|
||||
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} ${{matrix.node}}"
|
||||
|
||||
deploy:
|
||||
needs:
|
||||
|
||||
Reference in New Issue
Block a user