Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jordigh committed Nov 20, 2024
1 parent a205b9a commit ff808b6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build_and_test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
# it is helpful to know which sets of tests would have succeeded,
# even when there is a failure.
Expand Down Expand Up @@ -55,6 +55,9 @@ jobs:
- name: Install Node.js packages
run: yarn install

- name: Install gvisor
run: sudo apt install runsc

- name: Run eslint
if: contains(matrix.tests, ':lint:')
run: yarn run lint:ci
Expand Down
2 changes: 1 addition & 1 deletion app/server/lib/ActiveDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2830,7 +2830,7 @@ export class ActiveDoc extends EventEmitter {

private async _makeEngine(): Promise<ISandbox> {
// Figure out what kind of engine we need for this document.
let preferredPythonVersion: '2' | '3' = process.env.PYTHON_VERSION === '3' ? '3' : '2';
let preferredPythonVersion: '2' | '3' = process.env.PYTHON_VERSION === '2' ? '2' : '3';

// Careful, migrations may not have run on this document and it may not have a
// documentSettings column. Failures are treated as lack of an engine preference.
Expand Down
13 changes: 9 additions & 4 deletions test/server/generateInitialDocSql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ describe('generateInitialDocSql', function() {
await execFile(path.join(getAppRoot(), 'buildtools/update_schema.sh'), [
newSchemaTs, newSqlTs,
], { env: process.env });
assert.equal((await fse.readFile(newSchemaTs)).toString(),
(await fse.readFile(currentSchemaTs)).toString());
assert.equal((await fse.readFile(newSqlTs)).toString(),
(await fse.readFile(currentSqlTs)).toString());

assert.equal(normaliseSQLiteInfinity((await fse.readFile(newSchemaTs)).toString()),
normaliseSQLiteInfinity((await fse.readFile(currentSchemaTs)).toString()));
assert.equal(normaliseSQLiteInfinity((await fse.readFile(newSqlTs)).toString()),
normaliseSQLiteInfinity((await fse.readFile(currentSqlTs)).toString()));
});
});

function normaliseSQLiteInfinity(sql: string) {
return sql.replace(/\b1e\+?999\b/g, '9.0e+999');
}

0 comments on commit ff808b6

Please sign in to comment.