Skip to content

Commit 9cdf1ae

Browse files
committed
Fixed: Windows tests
Hatefull CRLF...
1 parent 6a70eab commit 9cdf1ae

File tree

3 files changed

+65
-197
lines changed

3 files changed

+65
-197
lines changed

.github/workflows/ci_push.yml

+65-67
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,27 @@ on:
1111
- 'LICENSE'
1212
- 'package.json'
1313
- 'readme.md'
14-
- 'test/**' # TODO: delete!
1514

1615
jobs:
17-
# lint:
18-
# name: Lint
19-
# if: |
20-
# !startsWith(github.event.head_commit.message, 'Release version ')
21-
# runs-on: ubuntu-latest
22-
# steps:
23-
# - name: Check out repository
24-
# uses: actions/checkout@v3
25-
# - name: Install Node.js
26-
# uses: actions/setup-node@v3
27-
# with:
28-
# node-version: 16.x
29-
# # cache: 'npm'
30-
# - run: npm install
31-
# - run: npm run lint
16+
lint:
17+
name: Lint
18+
if: |
19+
!startsWith(github.event.head_commit.message, 'Release version ')
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v3
24+
- name: Install Node.js
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 16.x
28+
# cache: 'npm'
29+
- run: npm install
30+
- run: npm run lint
3231

3332
test:
3433
name: Test (Node.js ${{ matrix.node-version }} on ${{ matrix.os }})
35-
# needs: lint
34+
needs: lint
3635
strategy:
3736
fail-fast: false
3837
matrix:
@@ -57,61 +56,60 @@ jobs:
5756
node-version: ${{ matrix.node-version }}
5857
# cache: 'npm'
5958
- run: npm install
60-
# - run: npm test
61-
- run: npm run wintest
59+
- run: npm test
6260

63-
# version_publish_release:
64-
# name: Version / Publish / Release
65-
# needs: test
66-
# if: |
67-
# !contains(github.event.head_commit.message, '[!VERSION]')
68-
# runs-on: ubuntu-latest
69-
# steps:
70-
# - name: Check out repository
71-
# uses: actions/checkout@v3
72-
# with:
73-
# token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
61+
version_publish_release:
62+
name: Version / Publish / Release
63+
needs: test
64+
if: |
65+
!contains(github.event.head_commit.message, '[!VERSION]')
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Check out repository
69+
uses: actions/checkout@v3
70+
with:
71+
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
7472

75-
# - name: Install Node.js
76-
# uses: actions/setup-node@v3
77-
# with:
78-
# node-version: 16.x
79-
# registry-url: https://registry.npmjs.org/
73+
- name: Install Node.js
74+
uses: actions/setup-node@v3
75+
with:
76+
node-version: 16.x
77+
registry-url: https://registry.npmjs.org/
8078

81-
# # - run: git config --global user.name 'github-actions'
82-
# # - run: git config --global user.email 'github-actions@github.com'
83-
# - run: git config --global user.name 'vHeemstra'
84-
# - run: git config --global user.email '17368112+vHeemstra@users.noreply.github.com'
79+
# - run: git config --global user.name 'github-actions'
80+
# - run: git config --global user.email 'github-actions@github.com'
81+
- run: git config --global user.name 'vHeemstra'
82+
- run: git config --global user.email '17368112+vHeemstra@users.noreply.github.com'
8583

86-
# # TODO? check all commits since last (= current) version instead of only the head_commit
84+
# TODO? check all commits since last (= current) version instead of only the head_commit
8785

88-
# - name: Major version
89-
# if: |
90-
# startsWith(github.event.head_commit.message, 'breaking') ||
91-
# startsWith(github.event.head_commit.message, 'major:')
92-
# run: echo "NEW_VERSION=$(npm version major -m 'Release version %s')" >> $GITHUB_ENV
93-
# - name: Minor version
94-
# if: |
95-
# startsWith(github.event.head_commit.message, 'feat') ||
96-
# startsWith(github.event.head_commit.message, 'minor:')
97-
# run: echo "NEW_VERSION=$(npm version minor -m 'Release version %s')" >> $GITHUB_ENV
98-
# - name: Patch version
99-
# if: |
100-
# !startsWith(github.event.head_commit.message, 'breaking') &&
101-
# !startsWith(github.event.head_commit.message, 'major:') &&
102-
# !startsWith(github.event.head_commit.message, 'feat') &&
103-
# !startsWith(github.event.head_commit.message, 'minor:')
104-
# run: echo "NEW_VERSION=$(npm version patch -m 'Release version %s')" >> $GITHUB_ENV
86+
- name: Major version
87+
if: |
88+
startsWith(github.event.head_commit.message, 'breaking') ||
89+
startsWith(github.event.head_commit.message, 'major:')
90+
run: echo "NEW_VERSION=$(npm version major -m 'Release version %s')" >> $GITHUB_ENV
91+
- name: Minor version
92+
if: |
93+
startsWith(github.event.head_commit.message, 'feat') ||
94+
startsWith(github.event.head_commit.message, 'minor:')
95+
run: echo "NEW_VERSION=$(npm version minor -m 'Release version %s')" >> $GITHUB_ENV
96+
- name: Patch version
97+
if: |
98+
!startsWith(github.event.head_commit.message, 'breaking') &&
99+
!startsWith(github.event.head_commit.message, 'major:') &&
100+
!startsWith(github.event.head_commit.message, 'feat') &&
101+
!startsWith(github.event.head_commit.message, 'minor:')
102+
run: echo "NEW_VERSION=$(npm version patch -m 'Release version %s')" >> $GITHUB_ENV
105103

106-
# - name: Push new version and tag
107-
# run: git push --follow-tags
104+
- name: Push new version and tag
105+
run: git push --follow-tags
108106

109-
# - name: Publish to NPM
110-
# run: npm publish
111-
# env:
112-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
107+
- name: Publish to NPM
108+
run: npm publish
109+
env:
110+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
113111

114-
# - name: Create GitHub release
115-
# run: gh release create ${{ env.NEW_VERSION }} --generate-notes
116-
# env:
117-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
- name: Create GitHub release
113+
run: gh release create ${{ env.NEW_VERSION }} --generate-notes
114+
env:
115+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"scripts": {
77
"lint": "eslint src/*.js test/*.js",
88
"lint:fix": "eslint --fix src/*.js test/*.js",
9-
"wintest": "jest test/experiment.test.js",
109
"test": "jest"
1110
},
1211
"keywords": [

test/experiment.test.js

-129
This file was deleted.

0 commit comments

Comments
 (0)