Merge branch 'main' into private-templates

This commit is contained in:
Harshil Sharma 2022-03-24 07:30:09 +05:30
commit bcdde138a9
19 changed files with 103 additions and 80 deletions

View file

@ -1,10 +1,47 @@
name: Check-in tests
on: [push, pull_request]
on:
push:
branches:
- 'main'
- 'releases-**'
pull_request:
workflow_dispatch:
jobs:
ci-ubuntu:
ci-ubuntu-server:
runs-on: ubuntu-18.04
strategy:
matrix:
db:
- sqlite
- mysql
- postgres
steps:
- name: Checkout
uses: actions/checkout@v2
- name: npm ci
run: cd webapp; npm ci
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build Linux server
run: make server-linux-package
- name: Copy server binary for Cypress
run: cp bin/linux/focalboard-server bin/
- name: "Test server: ${{matrix['db']}}"
run: make server-test-${{matrix['db']}}
ci-ubuntu-webapp:
runs-on: ubuntu-18.04
steps:
@ -39,15 +76,6 @@ jobs:
name: focalboard-server-linux-amd64.tar.gz
path: ${{ github.workspace }}/dist/focalboard-server-linux-amd64.tar.gz
- name: "Test server: sqlite"
run: make server-test
- name: "Test server: mysql"
run: make server-test-mysql
- name: "Test server: postgres"
run: make server-test-postgres
- name: "Test webapp: Jest"
run: cd webapp; npm run test

View file

@ -2,10 +2,9 @@
"serverRoot": "http://localhost:8000",
"port": 8000,
"dbtype": "sqlite3",
"dbconfig": "./focalboard.db",
"dbconfig": "./focalboard.db?_busy_timeout=5000",
"dbtableprefix": "",
"postgres_dbconfig": "dbname=focalboard sslmode=disable",
"test_dbconfig": "file::memory:?cache=shared",
"useSSL": false,
"webpath": "./webapp/pack",
"filesdriver": "local",

View file

@ -8478,9 +8478,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/mkdirp": {
@ -19769,9 +19769,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"mkdirp": {

View file

@ -8,7 +8,7 @@
"name": "focalboard-asana-importer",
"version": "1.0.0",
"dependencies": {
"minimist": "^1.2.5"
"minimist": "^1.2.6"
},
"devDependencies": {
"@types/minimist": "^1.2.1",
@ -1126,9 +1126,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/ms": {
"version": "2.1.2",
@ -2558,9 +2558,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"ms": {
"version": "2.1.2",

View file

@ -22,6 +22,6 @@
"typescript": "^4.1.5"
},
"dependencies": {
"minimist": "^1.2.5"
"minimist": "^1.2.6"
}
}

View file

@ -8,7 +8,7 @@
"name": "focalboard-jira-importer",
"version": "1.0.0",
"dependencies": {
"minimist": "^1.2.5",
"minimist": "^1.2.6",
"turndown": "^7.1.1",
"xml2js": "^0.4.23"
},
@ -3933,9 +3933,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/ms": {
"version": "2.1.2",
@ -8330,9 +8330,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"ms": {
"version": "2.1.2",

View file

@ -43,7 +43,7 @@
"typescript": "^4.1.5"
},
"dependencies": {
"minimist": "^1.2.5",
"minimist": "^1.2.6",
"turndown": "^7.1.1",
"xml2js": "^0.4.23"
}

View file

@ -15,7 +15,7 @@
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"eslint": "^7.20.0",
"minimist": "^1.2.5",
"minimist": "^1.2.6",
"node-fetch": "^2.6.7",
"readline-sync": "^1.4.10",
"ts-node": "^10.4.0",
@ -1343,9 +1343,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/ms": {
@ -2994,9 +2994,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"ms": {

View file

@ -20,7 +20,7 @@
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"eslint": "^7.20.0",
"minimist": "^1.2.5",
"minimist": "^1.2.6",
"node-fetch": "^2.6.7",
"readline-sync": "^1.4.10",
"ts-node": "^10.4.0",

View file

@ -9,7 +9,7 @@
"version": "1.0.0",
"dependencies": {
"csvtojson": "^2.0.10",
"minimist": "^1.2.5"
"minimist": "^1.2.6"
},
"devDependencies": {
"@types/minimist": "^1.2.1",
@ -1152,9 +1152,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/ms": {
"version": "2.1.2",
@ -2614,9 +2614,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"ms": {
"version": "2.1.2",

View file

@ -23,6 +23,6 @@
},
"dependencies": {
"csvtojson": "^2.0.10",
"minimist": "^1.2.5"
"minimist": "^1.2.6"
}
}

View file

@ -8,7 +8,7 @@
"name": "focalboard-todoist-importer",
"version": "1.0.0",
"dependencies": {
"minimist": "^1.2.5"
"minimist": "^1.2.6"
},
"devDependencies": {
"@types/minimist": "^1.2.1",
@ -1126,9 +1126,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/ms": {
"version": "2.1.2",
@ -2558,9 +2558,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"ms": {
"version": "2.1.2",

View file

@ -22,6 +22,6 @@
"typescript": "^4.1.5"
},
"dependencies": {
"minimist": "^1.2.5"
"minimist": "^1.2.6"
}
}

View file

@ -8,7 +8,7 @@
"name": "focalboard-trello-importer",
"version": "1.0.0",
"dependencies": {
"minimist": "^1.2.5"
"minimist": "^1.2.6"
},
"devDependencies": {
"@types/minimist": "^1.2.1",
@ -1126,9 +1126,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/ms": {
"version": "2.1.2",
@ -2558,9 +2558,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"ms": {
"version": "2.1.2",

View file

@ -22,6 +22,6 @@
"typescript": "^4.1.5"
},
"dependencies": {
"minimist": "^1.2.5"
"minimist": "^1.2.6"
}
}

View file

@ -11537,8 +11537,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/mkdirp": {
@ -23908,8 +23909,9 @@
}
},
"minimist": {
"version": "1.2.5",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"mkdirp": {

View file

@ -3,7 +3,6 @@ package sqlstore
import (
"database/sql"
"fmt"
"io/ioutil"
"os"
"strings"
@ -34,12 +33,7 @@ func PrepareNewTestDatabase() (dbType string, connectionString string, err error
var rootUser string
if dbType == model.SqliteDBType {
file, err := ioutil.TempFile("", "fbtest_*.db")
if err != nil {
return "", "", err
}
connectionString = file.Name()
_ = file.Close()
connectionString = "file::memory:?cache=shared&_busy_timeout=5000"
} else if port := strings.TrimSpace(os.Getenv("FB_STORE_TEST_DOCKER_PORT")); port != "" {
// docker unit tests take priority over any DSN env vars
var template string

View file

@ -2,7 +2,7 @@
"serverRoot": "http://localhost:8088",
"port": 8088,
"dbtype": "sqlite3",
"dbconfig": "file::memory:?cache=shared",
"dbconfig": "file::memory:?cache=shared&_busy_timeout=5000",
"useSSL": false,
"webpath": "../pack",
"filespath": "../../files",

View file

@ -76,7 +76,7 @@ Cypress.Commands.add('apiResetBoards', () => {
}).then((response) => {
if (Array.isArray(response.body)) {
const boards = response.body as Board[]
const toDelete = boards.filter((b) => !b.fields.isTemplate).map((b) => b.id)
const toDelete = boards.filter((b) => !b.isTemplate).map((b) => b.id)
deleteBlocks(toDelete)
}
})