Skip to content

Commit

Permalink
test: skip version export testing in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ma committed Jan 31, 2025
1 parent ab9de33 commit f0a8227
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
run: npm run lint

- name: Run Test
run: npm run test
run: npm run test:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
"doc": "npm run types && rm -rf docs && jsdoc -c .jsdoc --verbose && cp -R misc/assets docs/",
"lint": "npx eslint src",
"test": "npx mocha tests/*/*.spec.js",
"test:ci": "npx mocha tests/*/*.spec.js --ci",
"test:only": "npx mocha",
"types": "rm -rf types && tsc",
"preversion": "node ./misc/scripts/generate-version-file.js $npm_new_version && npm run types",
"preversion": "npm run lint && npm run test && node ./misc/scripts/generate-version-file.js $npm_new_version && npm run types",
"postversion": "node ./misc/scripts/check-changelog.js && git commit -am \"$npm_new_version\" --allow-empty"
},
"dependencies": {
Expand Down
9 changes: 8 additions & 1 deletion tests/misc/version-test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { assert } from 'chai';

import config from '../utils/config.js';
const { version } = JSON.parse(fs.readFileSync('package.json').toString());
const CI = process.argv.includes('--ci');

describe(`# Client / Server test versions discrepancies`, () => {
it(`client and server should check soundworks version used`, async () => {
Expand All @@ -26,7 +27,13 @@ describe(`# Client / Server test versions discrepancies`, () => {
await server.stop();
});

it('should properly export version', () => {
it('should properly export version', function() {
// Skip in CI - this crashes in CI when we make a new version because we have
// 2 different commits, not fundamentally critical...
if (CI) {
this.skip();
}

assert.equal(serverVersion, version);
assert.equal(clientVersion, version);
});
Expand Down

0 comments on commit f0a8227

Please sign in to comment.