Skip to content

Commit

Permalink
chore(server): improve server tests (#9958)
Browse files Browse the repository at this point in the history
I left these server tests in a not-so-great state after
#9948. Got around to improving
them today with @Josh-Walker-GM. Want to add more, but this covers the
new features I added, mainly the configuration around the web and api
ports and hosts.

I've tried to add this to CI before but they were flakey. I feel like
they're less flakey now and Josh helped me with retry logic. So I think
we could try adding them to CI again and see how it goes.

You can run these tests after building the framework. `cd` into
`tasks/server-tests` and run `yarn vitest run`. The tests also log the
bins they're using and you can run those verbatim.

I split the tests up into separate files mainly because the terminal
becomes unreadable if they're all in the same one.

---------

Co-authored-by: Tobbe Lundberg <[email protected]>
  • Loading branch information
jtoar and Tobbe committed Feb 4, 2024
1 parent 2df05e3 commit 6701dd4
Show file tree
Hide file tree
Showing 8 changed files with 528 additions and 315 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -711,3 +711,44 @@ jobs:

steps:
- run: echo "Skipped"

server-tests:
needs: check

name: Server tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 🔨 Build
run: yarn build

- run: yarn vitest run
working-directory: ./tasks/server-tests

server-tests-skip:
needs: detect-changes
if: needs.detect-changes.outputs.onlydocs == 'true'

name: Server tests
runs-on: ubuntu-latest

steps:
- run: echo "Skipped"
139 changes: 0 additions & 139 deletions tasks/server-tests/__snapshots__/bothServer.test.mts.snap

This file was deleted.

Loading

0 comments on commit 6701dd4

Please sign in to comment.