Skip to content

Commit

Permalink
Allow npm run test to work in isolation
Browse files Browse the repository at this point in the history
Instead of using the environment variables setup within the GitHub
Actions workflow, we should ensure that all tests pass through `npm run
test`, so it's an easier and more consistent local feedback loop.
  • Loading branch information
jamietanna committed Dec 7, 2021
1 parent 555f65e commit 89125d8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
run: npm run lint

- name: Run tests
env:
ROOT_URL: http://localhost:4444/
MEDIA_ENDPOINT_URL: http://localhost:3334/
run: npm test

- name: Deploy
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ jobs:
run: npm run lint

- name: Run tests
env:
MEDIA_ENDPOINT_URL: http://localhost:3334/
ROOT_URL: http://localhost:4444/
run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Personal website Micropub server",
"scripts": {
"start": "PORT=3333 arc sandbox",
"test": "NODE_ENV=testing PORT=3334 tape test/*-test.js",
"test": "NODE_ENV=testing PORT=3334 MEDIA_ENDPOINT_URL=http://localhost:3334/ ROOT_URL=http://localhost:4444/ tape test/*-test.js",
"lint": "standard"
},
"dependencies": {
Expand Down

0 comments on commit 89125d8

Please sign in to comment.