diff --git a/.build/pre-release.sh b/.build/pre-release.sh index 3e233bb..2483454 100644 --- a/.build/pre-release.sh +++ b/.build/pre-release.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash set -ex -npm ci -patchVersion=$(npm --no-git-tag version patch) -nextVersion=${patchVersion}-next."$(date +%Y%m%d%H%M%S)" -echo "${nextVersion:1}" +echo "snapshot release" -npm version --no-git-tag -f "${nextVersion:1}" -npm run publish-next \ No newline at end of file +#npm ci +#patchVersion=$(npm --no-git-tag version patch) +#nextVersion=${patchVersion}-next."$(date +%Y%m%d%H%M%S)" +#echo "${nextVersion:1}" +# +#npm version --no-git-tag -f "${nextVersion:1}" +#npm run publish-next \ No newline at end of file diff --git a/.github/workflows/snapshot.yaml b/.github/workflows/snapshot.yaml index c564f8e..5aa8cd1 100644 --- a/.github/workflows/snapshot.yaml +++ b/.github/workflows/snapshot.yaml @@ -43,33 +43,53 @@ jobs: -Dsonar.organization=nut-tree -Dsonar.host.url=https://sonarcloud.io/ -Dsonar.projectKey=nut-tree:nut.js -# test: -# needs: -# - sonar -# strategy: -# matrix: -# os: [ macos-latest, windows-latest, ubuntu-latest ] -# node: [ 10, 11, 12, 13, 14 ] -# exclude: -# - os: ubuntu-latest -# node: 14 -# runs-on: ${{matrix.os}} -# steps: -# - name: Set up Git repository -# uses: actions/checkout@v2 -# - name: Set up node -# uses: actions/setup-node@v2 -# with: -# node-version: ${{matrix.node}} -# deploy: -# needs: -# - sonar -# - test -# 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 + + test: + needs: + - sonar + strategy: + matrix: + os: [ macos-latest, windows-latest, ubuntu-latest ] + node: [ 10, 11, 12, 13, 14 ] + exclude: + - os: ubuntu-latest + node: 14 + runs-on: ${{matrix.os}} + 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 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: 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" + + deploy: + needs: + - sonar + - test + 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: Release Snapshot + run: bash ./.build/pre-release.sh