Skip to content

Commit

Permalink
Merge pull request #142 from Carifio24/testing-setup
Browse files Browse the repository at this point in the history
Set up testing infrastructure
  • Loading branch information
Carifio24 authored Sep 30, 2024
2 parents 8df95fc + 5a5cba8 commit 5f081d3
Show file tree
Hide file tree
Showing 34 changed files with 596 additions and 101 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.18.0'

- name: Install modules
run: npm install

Expand All @@ -21,3 +26,16 @@ jobs:

- name: Build
run: npm run build

- name: Start MySQL service
run: sudo systemctl start mysql.service

- name: Test
# This is just the default settings for GH Actions MySQL
# Nothing secret here aside from the hashed API key
env:
DB_TEST_HOSTNAME: 127.0.0.1
DB_TEST_USERNAME: root
DB_TEST_PASSWORD: root
HASHED_API_KEY: ${{ secrets.HASHED_API_KEY }}
run: npm run test
14 changes: 14 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Config } from "jest";

const config: Config = {
verbose: true,
silent: false,
preset: "ts-jest",
testEnvironment: "node",
coveragePathIgnorePatterns: [
"/node_modules/",
"/dist",
]
};

export default config;
Loading

0 comments on commit 5f081d3

Please sign in to comment.