-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from funidata/trunk
Test database migrations in CI
- Loading branch information
Showing
6 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
app/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Testing | ||
|
||
Currently, Kaiku's test suite includes only linting, formatting, and database migration checks. The | ||
plan is to utilize integration tests as the primary tool once the project matures slightly more. | ||
|
||
Passing all tests is required for code to be merged into `main`. | ||
|
||
## Local Development | ||
|
||
Run all local tests with `npm test`. (Does not include migration tests.) | ||
|
||
### Linting | ||
|
||
Linting is configured only for the `app/` folder and uses ESLint. | ||
|
||
```bash | ||
npm run lint | ||
``` | ||
|
||
### Formatting | ||
|
||
Prettier is used to format all code in the repository. The formatting test passes if formatting | ||
results in an empty diff. Prettier is configured in repository root. | ||
|
||
```bash | ||
npm run format:check | ||
``` | ||
|
||
## CI/CD | ||
|
||
GitHub Actions is used for CI/CD. In addition to linting and formatting, also database migrations | ||
are run on CI. This test simply requires the migration run to result in the zero exit code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,9 @@ | |
"build": "docker compose build", | ||
"logs": "docker compose logs -f app", | ||
"postinstall": "cd app && npm ci", | ||
"format:check": "prettier --check ." | ||
"format:check": "prettier --check .", | ||
"lint": "cd app && npm run lint", | ||
"test": "npm run format:check && npm run lint" | ||
}, | ||
"author": "Joonas Häkkinen <[email protected]>", | ||
"license": "GPL-3.0", | ||
|