Skip to content

Commit

Permalink
fix(tests): fixes test and lint issues
Browse files Browse the repository at this point in the history
knex upgrade broke several tests
  • Loading branch information
Matt Goodson authored and Matt Goodson committed Jan 25, 2023
1 parent ad9313b commit f0014ea
Show file tree
Hide file tree
Showing 7 changed files with 433 additions and 1,694 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/docs.yml
@@ -1,30 +1,32 @@
name: docs-actions
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
# Only run when docs are changed
push:
paths:
- 'docs/**'
branches:
- main
- master
# Trigger the workflow on push or pull request,
# but only for the main branch
# Only run when docs are changed
push:
paths:
- 'docs/**'
branches:
- main
- master

jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Install
run: npm ci
working-directory: ./docs
- name: Deploy
run: |
git config --global user.email "mattgson@github.com"
git config --global user.name "mattgson"
npm run deploy
working-directory: ./docs
env:
GIT_USER: mattgson
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Install
run: npm ci
working-directory: ./docs
- name: Deploy
run: |
git config --global user.email "mattgson@github.com"
git config --global user.name "mattgson"
npm run deploy
working-directory: ./docs
env:
GIT_USER: mattgson
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
132 changes: 66 additions & 66 deletions .github/workflows/features.yml
@@ -1,75 +1,75 @@
name: feature-actions
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
# Ignore when only docs are changed
# Trigger the workflow on push or pull request,
# but only for the main branch
# Ignore when only docs are changed

push:
paths:
- 'src/**'
- 'test/**'
branches:
- main
- master
pull_request:
paths:
- 'src/**'
- 'test/**'
branches:
- main
- master
push:
paths:
- 'src/**'
- 'test/**'
branches:
- main
- master
pull_request:
paths:
- 'src/**'
- 'test/**'
branches:
- main
- master

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run lint
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run lint

test-mysql:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 10, 12, 14 ]
services:
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
TZ: 'UTC'
MYSQL_ROOT_PASSWORD: ''
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: 'tests'
test-mysql:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16]
services:
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
TZ: 'UTC'
MYSQL_ROOT_PASSWORD: ''
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: 'tests'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run test:mysql
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run test:mysql

test-postgres:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 10, 12, 14 ]
services:
postgres:
image: postgres:13-alpine
ports:
- 5432:5432
env:
TZ: 'UTC'
PGTZ: 'UTC'
POSTGRES_USER: 'postgres' # default user
POSTGRES_DB: 'tests'
POSTGRES_PASSWORD: 'password'
POSTGRES_HOST_AUTH_METHOD: 'trust' # allow all connections without password
test-postgres:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16]
services:
postgres:
image: postgres:13-alpine
ports:
- 5432:5432
env:
TZ: 'UTC'
PGTZ: 'UTC'
POSTGRES_USER: 'postgres' # default user
POSTGRES_DB: 'tests'
POSTGRES_PASSWORD: 'password'
POSTGRES_HOST_AUTH_METHOD: 'trust' # allow all connections without password

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run test:pg
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run test:pg
44 changes: 22 additions & 22 deletions .github/workflows/release.yml
@@ -1,25 +1,25 @@
name: Release
on:
push:
branches:
- master
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

0 comments on commit f0014ea

Please sign in to comment.