Skip to content

Commit 538c8a6

Browse files
committed
Enabled matrix build and release jobs
1 parent 8322c10 commit 538c8a6

File tree

2 files changed

+58
-36
lines changed

2 files changed

+58
-36
lines changed

.build/pre-release.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
npm ci
5-
patchVersion=$(npm --no-git-tag version patch)
6-
nextVersion=${patchVersion}-next."$(date +%Y%m%d%H%M%S)"
7-
echo "${nextVersion:1}"
4+
echo "snapshot release"
85

9-
npm version --no-git-tag -f "${nextVersion:1}"
10-
npm run publish-next
6+
#npm ci
7+
#patchVersion=$(npm --no-git-tag version patch)
8+
#nextVersion=${patchVersion}-next."$(date +%Y%m%d%H%M%S)"
9+
#echo "${nextVersion:1}"
10+
#
11+
#npm version --no-git-tag -f "${nextVersion:1}"
12+
#npm run publish-next

.github/workflows/snapshot.yaml

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,53 @@ jobs:
4343
-Dsonar.organization=nut-tree
4444
-Dsonar.host.url=https://sonarcloud.io/
4545
-Dsonar.projectKey=nut-tree:nut.js
46-
# test:
47-
# needs:
48-
# - sonar
49-
# strategy:
50-
# matrix:
51-
# os: [ macos-latest, windows-latest, ubuntu-latest ]
52-
# node: [ 10, 11, 12, 13, 14 ]
53-
# exclude:
54-
# - os: ubuntu-latest
55-
# node: 14
56-
# runs-on: ${{matrix.os}}
57-
# steps:
58-
# - name: Set up Git repository
59-
# uses: actions/checkout@v2
60-
# - name: Set up node
61-
# uses: actions/setup-node@v2
62-
# with:
63-
# node-version: ${{matrix.node}}
64-
# deploy:
65-
# needs:
66-
# - sonar
67-
# - test
68-
# runs-on: ubuntu-latest
69-
# steps:
70-
# - name: Set up Git repository
71-
# uses: actions/checkout@v2
72-
# - name: Set up node
73-
# uses: actions/setup-node@v2
74-
# with:
75-
# node-version: 14
46+
47+
test:
48+
needs:
49+
- sonar
50+
strategy:
51+
matrix:
52+
os: [ macos-latest, windows-latest, ubuntu-latest ]
53+
node: [ 10, 11, 12, 13, 14 ]
54+
exclude:
55+
- os: ubuntu-latest
56+
node: 14
57+
runs-on: ${{matrix.os}}
58+
steps:
59+
- name: Set up Git repository
60+
uses: actions/checkout@v2
61+
- name: Set up node
62+
uses: actions/setup-node@v2
63+
with:
64+
node-version: 14
65+
- name: Setup Docker
66+
run: |
67+
docker pull s1hofmann/nut-ci:latest
68+
docker run -it -d --name nut-ci --shm-size 4gb --user $(id -u):$(id -g) -v ${PWD}:${PWD}:rw s1hofmann/nut-ci:latest bash
69+
- name: Install
70+
run: npm ci
71+
- name: Compile
72+
run: npm run compile
73+
- name: Init e2e test subpackage
74+
run: npm --prefix e2e/tests ci
75+
- name: Generate coverage report
76+
uses: GabrielBB/xvfb-action@v1
77+
with:
78+
run: npm run coverage -- --coverageDirectory=coverage/unit
79+
- name: Run Docker E2E tests
80+
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14"
81+
82+
deploy:
83+
needs:
84+
- sonar
85+
- test
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Set up Git repository
89+
uses: actions/checkout@v2
90+
- name: Set up node
91+
uses: actions/setup-node@v2
92+
with:
93+
node-version: 14
94+
- name: Release Snapshot
95+
run: bash ./.build/pre-release.sh

0 commit comments

Comments
 (0)