Skip to content

chore(deps): bump body-parser and express #124

chore(deps): bump body-parser and express

chore(deps): bump body-parser and express #124

Workflow file for this run

name: CI/CD
on:
push:
pull_request:
jobs:
ci-node:
name: Continuous Integration Node
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, lts/*, latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm run lint
ci-db-linting:
name: Continuous Integration Database - Linting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache requirements
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install requirements
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r db/linting/requirements.txt
- name: Analysing the SQL code
run: |
bash db/linting/lint.sh
ci-db-testing:
name: Continuous Integration Database - Testing
runs-on: ubuntu-latest
services:
postgres:
image: acprdev/postgres-ci:15.2
env:
DATABASE: test_postgres
HOST: localhost
PORT: 5432
USER: postgres
PASSWORD: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Setup Perl
id: perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.34'
install-modules-with: cpm
- name: Cache CPAN Modules
uses: actions/cache@v4
with:
path: local
key: perl-${{ steps.perl.outputs.perl-hash }}
- name: Install pg_prove
run: |
cpm install TAP::Parser::SourceHandler::pgTAP
env:
SHELL: /bin/bash
- name: Initialize database and run tests
run: |
bash db/cli/init_db.sh
bash db/cli/apply_all_migrations.sh
bash db/cli/run_tests.sh
env:
DATABASE: test_postgres
HOST: localhost
PORT: 5432
USER: postgres
PASSWORD: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
PGPASSWORD: postgres
cd:
name: Continuous Deployment
runs-on: ubuntu-latest
needs: [ci-node,ci-db-linting,ci-db-testing]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
id-token: write
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Publish package to NPM
run: npm publish --provenance --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build package to upload to GitHub releases
run: |
npm pack
mv acpr-rate-limit-postgresql-*.tgz acpr-rate-limit-postgresql.tgz
- name: Create a Github release
uses: softprops/action-gh-release@v2
with:
files: acpr-rate-limit-postgresql.tgz
body:
You can view the changelog
[here](https://github.com/express-rate-limit/express-rate-limit-postgresql/blob/master/changelog.md).