Skip to content

Commit

Permalink
Dependabot/v1.6.8/general updates (#68)
Browse files Browse the repository at this point in the history
* build(deps): bump tough-cookie from 4.1.2 to 4.1.3

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies

* fix: update test context and update to new node versions

* fix: pipeline update dynamodb

* fix: try to fix pipline exporting to services docker images

* update local node version

* ⚡

* creating a custon image to packate

* ⚡

* ⚡

* ⚡

* fix coverage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
gritzkoo and dependabot[bot] authored Aug 19, 2023
1 parent 7309ddd commit 7e1c18c
Show file tree
Hide file tree
Showing 8 changed files with 1,609 additions and 1,419 deletions.
105 changes: 16 additions & 89 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,24 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# keep the versions below up to date with https://nodejs.org/en/about/releases/
# use only up to lts
node-version: [14.x, 16.x]
redis-version: [6]
services:
postgresql:
image: postgres
env:
POSTGRES_PASSWORD: root
ports:
- 5432:5432

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Setup DynamoDB Local
uses: rrainn/dynamodb-action@v2.0.0
with:
port: 8000
cors: "*"

- name: Configure Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Start Redis
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: ${{ matrix.redis-version }}

- name: Sets up a Memcached server
uses: niden/actions-memcached@v7

- name: Cache node_modules
id: cache-modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}

- name: Install npm in version ${{ matrix.node-version }}
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install --legacy-peer-deps

- name: Run test in version ${{ matrix.node-version }}
run: npm run test:coverage
env:
CI: true

- name: upload coverage artifact v${{ matrix.node-version }}
- name: use docker to test
run: |
docker compose run --rm test bash -c 'npm install --legacy-peer-deps --python=python3 && npm run test:coverage && npm run build --python=python3'
- name: upload coverage artifact
uses: actions/upload-artifact@v2
with:
name: coveragev-${{ matrix.node-version }}
name: coverage
path: coverage/lcov.info
if-no-files-found: error
- name: Generate dist artifact
uses: actions/upload-artifact@v2
with:
name: dist-folder
path: dist/**/*
if-no-files-found: error

coverage:
needs: test
Expand All @@ -70,53 +30,21 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: coveragev-16.x
name: coverage
path: coverage
- name: Generate coverage in coverall
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build application
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12"

- name: Cache node_modules
id: cache-modules
uses: actions/cache@v2
with:
path: node_modules
key: 12.x-${{ runner.OS }}-build-${{ hashFiles('package.json') }}

- name: Install NPM
if: steps.cache-modules.outputs.cache-hit != 'true'
run: npm install

- name: Build application
run: npm run build

- name: Generate dist artifact v${{ matrix.node-version }}
uses: actions/upload-artifact@v2
with:
name: dist-folder
path: dist/**/*
if-no-files-found: error

validate:
name: check version is valid to release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- name: Validate if can be published
run: |
REVIEW_JS=`npm view --json`
Expand All @@ -135,15 +63,15 @@ jobs:
publish:
name: NPM package publish
needs:
- build
- test
- validate
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@v2
with:
Expand All @@ -159,4 +87,3 @@ jobs:
NOTES=`git show -s --format="%s%n%n%b"`
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
gh release create "v${NEW_TAG}" --title "v${NEW_TAG}" --notes "${NOTES}"
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM node:20
RUN apt update && apt upgrade -y && apt install python3
RUN npm i -g npm --python=python3
ENV PYTHON=python3
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
![npm](https://img.shields.io/npm/dt/nodejs-health-checker?style=for-the-badge)<br>
[![npm version](https://badge.fury.io/js/nodejs-health-checker.svg)](https://badge.fury.io/js/nodejs-health-checker)
![test](https://github.com/gritzkoo/nodejs-health-checker/workflows/test/badge.svg?branch=master)
![GitHub Workflow Status (event)](https://img.shields.io/github/workflow/status/gritzkoo/nodejs-health-checker/test)
[![Coverage Status](https://coveralls.io/repos/github/gritzkoo/nodejs-health-checker/badge.svg?branch=master)](https://coveralls.io/github/gritzkoo/nodejs-health-checker?branch=master)
[![License Status](https://img.shields.io/github/license/gritzkoo/nodejs-health-checker)](https://img.shields.io/github/license/gritzkoo/nodejs-health-checker)
[![Issues Status](https://img.shields.io/github/issues/gritzkoo/nodejs-health-checker)](https://img.shields.io/github/issues/gritzkoo/nodejs-health-checker)
Expand Down
24 changes: 14 additions & 10 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ version: "3.7"
services:
app:
&default
image: node:18.14.1
image: nhc:v1
build: .
working_dir: /app/
command: npm run dev
environment:
Expand All @@ -12,6 +13,7 @@ services:
WEB_HOST: https://github.com/status
DYNAMO_HOST: http://dynamodb
DATABASE_HOST: postgresql
PYTHON: python3
volumes:
- .:/app
ports:
Expand All @@ -25,7 +27,7 @@ services:
#the services below is a short hand to use npm in docker context
test:
<<: *default
command: npm run test
command: npm run test:coverage
ports: []

lint:
Expand All @@ -42,22 +44,24 @@ services:

redis:
image: redis
ports:
- 6379:6379
# ports:
# - 6379:6379

memcache:
image: memcached:1.4.21
ports:
- 11211:11211
# ports:
# - 11211:11211

dynamodb:
image: amazon/dynamodb-local
ports:
- "8000:8000"
environment:
AWS_ACCESS_KEY_ID: test
# ports:
# - "8000:8000"

postgresql:
image: postgres
environment:
POSTGRES_PASSWORD: root
ports:
- 5432:5432
# ports:
# - 5432:5432
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
"<rootDir>/src/**/*.ts",
"!src/server.ts",
"!src/index.ts",
"!src/evns.ts",
"!src/envs.ts",
"!src/interfaces/**/*"
],
coverageDirectory: "coverage",
Expand Down
Loading

0 comments on commit 7e1c18c

Please sign in to comment.