Skip to content

Commit

Permalink
feat(pee): Try to fix release action and add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jukefr committed Mar 30, 2022
1 parent ebea5f3 commit f1e6297
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ jobs:
version: ${{ steps.check_versions.outputs.version }} # this uses the id from the step itself, not the job (they are the same)
continue: ${{ steps.check_versions.outputs.continue }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
id: check_versions
- run: git fetch --prune --unshallow
- run: git describe --tags --abbrev=0 > /tmp/latest_tag # we get the latest tag and store it
- run: echo "latest git tag is $(cat /tmp/latest_tag)"
- run: jq -r ".version" package.json > /tmp/current_version # we get the current package.json version and store it
- run: echo "packge.json version is $(cat /tmp/current_version)"
- run: echo "::set-output name=version::$(cat /tmp/current_version)" # we set the current version as variable for the next job in case we continue
# we compare the two version, if mismatch we want a new release (run next job), if not we dont run the next job
- run: cmp --silent /tmp/latest_tag /tmp/current_version && echo "::set-output name=continue::false" || echo "::set-output name=continue::true"
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
}
},
"scripts": {
"test:cjs": "jest --env node --testTimeout 15000 --moduleFileExtensions js --moduleFileExtensions cjs --testMatch '**/*.test.cjs'",
"test:mjs": "NODE_OPTIONS=--experimental-vm-modules jest --env jsdom --transform '{}' --testTimeout 15000 --testMatch '**/*.test.js'",
"test:cjs:node": "jest --env node --testTimeout 25000 --moduleFileExtensions js --moduleFileExtensions cjs --testMatch '**/*.test.cjs'",
"test:cjs:jsdom": "jest --env jsdom --testTimeout 25000 --moduleFileExtensions js --moduleFileExtensions cjs --testMatch '**/*.test.cjs'",
"test:cjs": "npm run test:cjs:node && npm run test:cjs:jsdom",
"test:mjs:node": "NODE_OPTIONS=--experimental-vm-modules jest --env node --transform '{}' --testTimeout 25000 --testMatch '**/*.test.js'",
"test:mjs:jsdom": "NODE_OPTIONS=--experimental-vm-modules jest --env jsdom --transform '{}' --testTimeout 25000 --testMatch '**/*.test.js'",
"test:mjs": "npm run test:mjs:node && npm run test:mjs:jsdom",
"test": "npm run test:cjs && npm run test:mjs"
},
"repository": {
Expand Down

0 comments on commit f1e6297

Please sign in to comment.