test: efficiency
This commit is contained in:
parent
168a8700cd
commit
2e6b424499
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
|
@ -13,22 +13,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: 'npm'
|
||||
- run: npm config set registry ${{ vars.NPM_CI_REGISTRY }}
|
||||
if: ${{ vars.NPM_CI_REGISTRY }}
|
||||
- run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
test:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: ${{ vars.CI_PARALLEL || 256 }}
|
||||
|
@ -41,31 +26,24 @@ jobs:
|
|||
with:
|
||||
packages: libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2
|
||||
version: ${{ matrix.node-version }}
|
||||
- uses: browser-actions/setup-chrome@latest
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm config set registry ${{ vars.NPM_CI_REGISTRY }}
|
||||
if: ${{ vars.NPM_CI_REGISTRY }}
|
||||
- run: |
|
||||
npm ci
|
||||
npm run -- test -t 30000
|
||||
npm run -- test -t 30000 -p e2e
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: 'npm'
|
||||
path: "~/.cache/puppeteer"
|
||||
key: ${{ runner.os }}-${{ matrix.node-version }}-puppeteer
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('package-lock.json') }}
|
||||
- run: npm config set registry ${{ vars.NPM_CI_REGISTRY }}
|
||||
if: ${{ vars.NPM_CI_REGISTRY }}
|
||||
- run: |
|
||||
npm ci
|
||||
npm run lint
|
||||
|
||||
npm run build
|
||||
npm run -- test -t 30000
|
||||
npm run -- test -t 30000 -p e2e
|
||||
|
|
|
@ -8,6 +8,7 @@ import {withServer} from './build/build';
|
|||
it('allows updates to fail', withServer(async ({server, socket}) => {
|
||||
expect((await socket.send({type: 'config.get', payload: 'comm.foo'})).payload)
|
||||
.to.equal('bar');
|
||||
const hmr = socket.waitForAction('hmr');
|
||||
await writeFile(
|
||||
join(server.path, 'build', 'flecks.yml'),
|
||||
`
|
||||
|
@ -17,7 +18,7 @@ it('allows updates to fail', withServer(async ({server, socket}) => {
|
|||
'comm:./comm': {foo: 'baz'}
|
||||
`,
|
||||
);
|
||||
await socket.waitForAction('hmr');
|
||||
await hmr;
|
||||
expect((await socket.send({type: 'config.get', payload: 'comm.foo'})).payload)
|
||||
.to.equal('baz');
|
||||
let restarted;
|
||||
|
|
Loading…
Reference in New Issue
Block a user