Skip to content

Commit

Permalink
Initial node update and test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
apricot13 committed Apr 18, 2024
1 parent 033fa0d commit eedf70d
Show file tree
Hide file tree
Showing 11 changed files with 2,326 additions and 1,819 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ yarn-error.log*
.idea
.vscode
.ruby-lsp
coverage

# heroku
Procfile
17 changes: 0 additions & 17 deletions .github/workflows/ci.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run tests
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v4
with:
node-version: lts/Iron

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: wearefuturegov/outpost-api-service
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.env
/environment/artifacts
.DS_Store
.DS_Store
coverage
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.18.0
lts/Iron
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG NODE_ENV=development

# ----------------------------------------------------------------
FROM node:16-alpine3.17 as build_frontend
FROM node:iron-alpine as build_frontend
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG NODE_ENV=production
ARG FORCE_SSL=true

# ----------------------------------------------------------------
FROM node:16-alpine3.17 as build_frontend
FROM node:iron-alpine as build_frontend
ARG NODE_ENV
ARG FORCE_SSL
ENV NODE_ENV $NODE_ENV
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TODO

- [ ] Automate tests with docker and github actions
- [x] Automate tests with docker and github actions
- [ ] Automatic linter on commit and PR's
- [x] An option to push some dummy data to the API
2 changes: 1 addition & 1 deletion db.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let db

module.exports = {
connect: cb => {
MongoClient.connect(uri, { useUnifiedTopology: true })
MongoClient.connect(uri)
.then(client => {
db = client.db()
cb(db)
Expand Down
Loading

0 comments on commit eedf70d

Please sign in to comment.