chore: update gitignore with test dirs
This commit is contained in:
parent
aeaf11ced6
commit
9ee2556dd1
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
@ -35,7 +35,6 @@ jobs:
|
|||||||
uses: ./ci/images/debian10
|
uses: ./ci/images/debian10
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/test-unit.sh
|
args: ./ci/steps/test-unit.sh
|
||||||
|
|
||||||
test-e2e:
|
test-e2e:
|
||||||
needs: linux-amd64
|
needs: linux-amd64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -53,15 +52,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd release-packages && tar -xzf code-server*-linux-amd64.tar.gz
|
cd release-packages && tar -xzf code-server*-linux-amd64.tar.gz
|
||||||
- uses: microsoft/playwright-github-action@v1
|
- uses: microsoft/playwright-github-action@v1
|
||||||
- name: Install dependencies and run tests
|
- name: Install dependencies and run end-to-end tests
|
||||||
with:
|
run: |
|
||||||
args: ./ci/steps/test-e2e.sh
|
./release-packages/code-server*-linux-amd64/bin/code-server --home $CODE_SERVER_ADDRESS/healthz &
|
||||||
|
yarn --frozen-lockfile
|
||||||
|
yarn test:e2e
|
||||||
- name: Upload test artifacts
|
- name: Upload test artifacts
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test-videos
|
name: test-videos
|
||||||
path: ./test/e2e//videos
|
path: ./test/e2e/videos
|
||||||
- name: Remove release packages and test artifacts
|
- name: Remove release packages and test artifacts
|
||||||
run: rm -rf ./release-packages ./test/e2e/videos
|
run: rm -rf ./release-packages ./test/e2e/videos
|
||||||
|
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -16,5 +16,5 @@ node-*
|
|||||||
.home
|
.home
|
||||||
coverage
|
coverage
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
test/videos
|
test/e2e/videos
|
||||||
test/screenshots
|
test/e2e/screenshots
|
||||||
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||||||
main() {
|
main() {
|
||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
|
|
||||||
./release-packages/code-server*-linux-amd64/bin/code-server --home $CODE_SERVER_ADDRESS/healthz &
|
"./release-packages/code-server*-linux-amd64/bin/code-server" --home "$CODE_SERVER_ADDRESS"/healthz &
|
||||||
yarn --frozen-lockfile
|
yarn --frozen-lockfile
|
||||||
yarn test:e2e
|
yarn test:e2e
|
||||||
}
|
}
|
||||||
|
21
test/utils/integration.ts
Normal file
21
test/utils/integration.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import * as express from "express"
|
||||||
|
import { createApp } from "../../src/node/app"
|
||||||
|
import { parse, setDefaults, parseConfigFile, DefaultedArgs } from "../../src/node/cli"
|
||||||
|
import { register } from "../../src/node/routes"
|
||||||
|
import * as httpserver from "./httpserver"
|
||||||
|
|
||||||
|
export async function setup(
|
||||||
|
argv: string[],
|
||||||
|
configFile?: string,
|
||||||
|
): Promise<[express.Application, express.Application, httpserver.HttpServer, DefaultedArgs]> {
|
||||||
|
argv = ["--bind-addr=localhost:0", ...argv]
|
||||||
|
|
||||||
|
const cliArgs = parse(argv)
|
||||||
|
const configArgs = parseConfigFile(configFile || "", "test/integration.ts")
|
||||||
|
const args = await setDefaults(cliArgs, configArgs)
|
||||||
|
|
||||||
|
const [app, wsApp, server] = await createApp(args)
|
||||||
|
await register(app, wsApp, server, args)
|
||||||
|
|
||||||
|
return [app, wsApp, new httpserver.HttpServer(server), args]
|
||||||
|
}
|
Reference in New Issue
Block a user