Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
bbe8821
Re-org for new test files. Working 'exists' and 'end to end' route t…
thehabes May 21, 2024
9a27735
Don't need dotenv because we have app.js here
thehabes May 21, 2024
e68e4aa
Check expected RESTful responses on common incorrect usages of the ro…
thehabes May 21, 2024
f869317
introduce CI/CD file improvements
thehabes May 21, 2024
887ef4e
introduce CI/CD file improvements
thehabes May 21, 2024
480e610
Include testing around the '/app' version of routes as well
thehabes May 22, 2024
68d8771
proper rebase
thehabes May 22, 2024
e880f08
ah another main to deep fake
thehabes May 22, 2024
b04c7c6
more rebase
thehabes May 22, 2024
0772216
trigger again and watch logs
thehabes May 22, 2024
228439e
Rewording for which tests run during which situations
thehabes May 22, 2024
ffa6dcb
Rewording for which tests run during which situations
thehabes May 22, 2024
06707aa
Notes and demo
thehabes May 23, 2024
391ca55
Get rid of noise. Full test suite for the create route.
thehabes May 24, 2024
dafece1
Get rid of noise. Full test suite for the create route.
thehabes May 24, 2024
d394771
undiff
thehabes May 24, 2024
bf808a7
undiff
thehabes May 24, 2024
4b37bf4
undiff
thehabes May 24, 2024
8cd8b59
undiff
thehabes May 24, 2024
1ba34ec
documentation
thehabes May 24, 2024
6af1c91
Move test differentiation tags to describe
thehabes May 24, 2024
2e7cc05
ah words
thehabes May 24, 2024
61acd2a
create, update, and overwrite tests
thehabes May 28, 2024
dda04a3
All API tests pretty and passing. Prepare for review.
thehabes May 28, 2024
b585535
Prepare for review.
thehabes May 28, 2024
31f62c7
remove redundant tests and leave a note behind. Make sure documentati…
thehabes May 29, 2024
58b69d0
Reduce log noise in tests
thehabes May 29, 2024
4e532af
Prepared to work on CI/CD and will branch
thehabes May 29, 2024
fa6a89f
merge in main
thehabes May 30, 2024
7265b5b
use real main and repoint PR
thehabes May 30, 2024
78a8e36
trigger once for good measure
thehabes May 30, 2024
49dcbbc
trigger twice to see if it is consistent.
thehabes May 30, 2024
684cccb
small change to 'id' check in /update /overwrite and /delete.
thehabes Nov 8, 2024
be69867
Simplify because we aren't doing releases at this time.
thehabes Nov 8, 2024
71491b9
hello
thehabes Nov 8, 2024
395cbc1
hello
thehabes Nov 8, 2024
50f1e7c
clear out workflow folder
thehabes Nov 8, 2024
e29d738
hello
thehabes Nov 8, 2024
3457f9e
hello
thehabes Nov 8, 2024
d58f684
Noting possible release workflow
thehabes Nov 8, 2024
5ef9eea
try again
thehabes Nov 8, 2024
78de0d9
try again
thehabes Nov 8, 2024
5891757
try again
thehabes Nov 8, 2024
1696728
try again
thehabes Nov 8, 2024
3ce58bb
try again
thehabes Nov 8, 2024
3feabf8
try again
thehabes Nov 8, 2024
9a45aee
split out for testing
thehabes Nov 8, 2024
04c460d
hmm
thehabes Nov 8, 2024
1dfcaf7
hmm
thehabes Nov 8, 2024
67c8ba3
hmm
thehabes Nov 8, 2024
150cb70
hmm
thehabes Nov 8, 2024
ec15661
hmm
thehabes Nov 8, 2024
d95d03d
hmm
thehabes Nov 8, 2024
9c1f232
hmm
thehabes Nov 8, 2024
10103e4
hmm
thehabes Nov 8, 2024
136d5ba
hmm
thehabes Nov 8, 2024
1dd425a
Oh boy this is super sneaky...I think I got around the tokens problem
thehabes Nov 8, 2024
31e2e11
Oh boy this is super sneaky...I think I got around the tokens problem
thehabes Nov 8, 2024
d8d00c2
This is it
thehabes Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/cd_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ jobs:
message: Merge main into this branch to deploy to dev for testing.
test:
needs: merge-branch
strategy:
matrix:
machines:
- vlcdhp02
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Create .env from secrets
uses: SpicyPizza/create-envfile@v2
with:
envkey_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
envkey_REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
envkey_RERUM_REGISTRATION_URL: ${{ secrets.RERUM_REGISTRATION_URL }}
envkey_RERUM_API_ADDR: ${{ secrets.RERUM_API_ADDR }}
envkey_RERUM_ID_PATTERN: ${{ secrets.RERUM_ID_PATTERN }}
envkey_RERUM_ACCESS_TOKEN_URL: ${{ secrets.RERUM_ACCESS_TOKEN_URL }}
envkey_RERUM_REGISTRATION_URL: https://devstore.rerum.io/v1
envkey_RERUM_API_ADDR: https://devstore.rerum.io/v1/api/
envkey_RERUM_ID_PATTERN: https://devstore.rerum.io/v1/id/
envkey_RERUM_ACCESS_TOKEN_URL: https://devstore.rerum.io/client/request-new-access-token
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: "21"
node-version: "20"
- name: Cache node modules
uses: actions/cache@master
env:
Expand All @@ -48,14 +50,16 @@ jobs:
- name: Install dependencies and run the test
run: |
npm install
npm run runtest
npm run functionalTests
deploy:
if: github.event.pull_request.draft == false
needs:
- merge-branch
- test
strategy:
matrix:
node-version:
- 20
machines:
- vlcdhp02
runs-on: ${{ matrix.machines }}
Expand All @@ -70,6 +74,7 @@ jobs:
cd /srv/node/tiny-node/
pm2 stop tinyNode
git stash
git checkout ${{ github.head_ref }}
git pull
npm install
pm2 start -i max bin/tinyNode.js
40 changes: 12 additions & 28 deletions .github/workflows/cd_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,21 @@ on:
branches: main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
machines:
- vlcdhprdp02
runs-on: ${{ matrix.machines }}
steps:
- uses: actions/checkout@master
- name: Create .env from secrets
uses: SpicyPizza/create-envfile@v2
with:
envkey_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
envkey_REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
envkey_RERUM_REGISTRATION_URL: ${{ secrets.RERUM_REGISTRATION_URL }}
envkey_RERUM_API_ADDR: ${{ secrets.RERUM_API_ADDR }}
envkey_RERUM_ID_PATTERN: ${{ secrets.RERUM_ID_PATTERN }}
envkey_RERUM_ACCESS_TOKEN_URL: ${{ secrets.RERUM_ACCESS_TOKEN_URL }}
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: "21"
- name: Cache node modules
uses: actions/cache@master
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{
hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies and run the test
- name: Test the app on the server
run: |
cd /srv/node/tiny-node/
git stash
git checkout main
git pull
npm install
npm run runtest
npm run allTests
deploy:
needs:
- test
Expand All @@ -55,6 +38,7 @@ jobs:
cd /srv/node/tiny-node/
pm2 stop tinyNode
git stash
git checkout main
git pull
npm install
pm2 start -i max bin/tinyNode.js
13 changes: 0 additions & 13 deletions __tests__/exist.test.js

This file was deleted.

4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import updateRouter from "./routes/update.js"
import deleteRouter from "./routes/delete.js"
import overwriteRouter from "./routes/overwrite.js"
import cors from "cors"
import {updateExpiredToken } from "./tokens.js"
import { updateExpiredToken } from "./tokens.js"

// Check for and update token on app start
updateExpiredToken ()
//updateExpiredToken()

let app = express()

Expand Down
120 changes: 0 additions & 120 deletions bin/testApp.js

This file was deleted.

2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const config = {
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: undefined,
transform: {},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand Down
Loading
Loading