Skip to content

Commit fe8de31

Browse files
authored
Merge pull request #2 from ComputerScienceHouse/zxcv
Add: Github Workflows
2 parents b1dd1bc + 4f626ce commit fe8de31

15 files changed

Lines changed: 157 additions & 43 deletions

‎.github/workflows/docker-build.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Docker
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
- main
7+
# Run tests for any PRs.
8+
pull_request:
9+
branches:
10+
- dev
11+
- main
12+
env:
13+
IMAGE_NAME: marks
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v7
19+
- name: Run tests
20+
run: |
21+
if [ -f docker-compose.test.yml ]; then
22+
docker-compose --file docker-compose.test.yml build
23+
docker-compose --file docker-compose.test.yml run sut
24+
else
25+
docker build . --file Dockerfile
26+
fi

‎.github/workflows/lint.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
- main
7+
pull_request:
8+
branches:
9+
- dev
10+
- main
11+
jobs:
12+
backend-lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v7
16+
- uses: actions/setup-go@v7
17+
with:
18+
go-version-file: go.mod
19+
- uses: actions/setup-node@v7
20+
with:
21+
node-version: 24
22+
cache: npm
23+
cache-dependency-path: web/package-lock.json
24+
- name: Build frontend
25+
run: |
26+
cd web
27+
npm ci
28+
npm run build
29+
- name: golangci-lint
30+
uses: golangci/golangci-lint-action@v9
31+
with:
32+
version: v2.12.2
33+
34+
frontend-lint:
35+
runs-on: ubuntu-latest
36+
defaults:
37+
run:
38+
working-directory: web
39+
steps:
40+
- uses: actions/checkout@v7
41+
- uses: actions/setup-node@v7
42+
with:
43+
node-version: 24
44+
cache: npm
45+
cache-dependency-path: web/package-lock.json
46+
- run: npm ci
47+
- run: npm run lint

‎docs.org‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
* Database Schema
2+
3+
** Events
4+
- id (UUID) (PRIMARY)
5+
- name (TEXT) (NOT NULL)
6+
- created_at (TIMESTAMP) (NOT NULL)
7+
- created_by (UUID) (NOT NULL)
8+
- status (TEXT) (NOT NULL) (open|archived)
9+
10+
** Timers
11+
- user_uuid (UUID) (NOT NULL) UNIQUE(user_uuid,event_id) # uniquely identifies a user's timer for an event
12+
- event_id (UUID) (NOT NULL) FOREIGN KEY(event_id) REFERENCES events(id) # references to events(id)
13+
- start_time (TIMESTAMP)
14+
- end_time (TIMESTAMP)
15+
16+
17+
** Audit Logs
18+
- id (UUID) (PRIMARY KEY)
19+
- event_id (UUID) (NOT NULL)
20+
- user_uuid (UUID) (NOT NULL)
21+
- action (TEXT) (NOT NULL)
22+
- created_at (TIMESTAMP) (NOT NULL)
23+
24+
* API #TODO

‎tmp/build-errors.log‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
1+
exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1

‎tmp/main‎

52.1 MB
Binary file not shown.

‎web/.prettierrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

‎web/README.md‎

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ If you are developing a production application, we recommend updating the config
1717

1818
```js
1919
export default defineConfig([
20-
globalIgnores(['dist']),
20+
globalIgnores(["dist"]),
2121
{
22-
files: ['**/*.{ts,tsx}'],
22+
files: ["**/*.{ts,tsx}"],
2323
extends: [
2424
// Other configs...
2525

@@ -34,42 +34,40 @@ export default defineConfig([
3434
],
3535
languageOptions: {
3636
parserOptions: {
37-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
37+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
3838
tsconfigRootDir: import.meta.dirname,
3939
},
4040
// other options...
4141
},
4242
},
43-
])
44-
43+
]);
4544
```
4645

4746
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
4847

4948
```js
5049
// eslint.config.js
51-
import reactX from 'eslint-plugin-react-x'
52-
import reactDom from 'eslint-plugin-react-dom'
50+
import reactX from "eslint-plugin-react-x";
51+
import reactDom from "eslint-plugin-react-dom";
5352

5453
export default defineConfig([
55-
globalIgnores(['dist']),
54+
globalIgnores(["dist"]),
5655
{
57-
files: ['**/*.{ts,tsx}'],
56+
files: ["**/*.{ts,tsx}"],
5857
extends: [
5958
// Other configs...
6059
// Enable lint rules for React
61-
reactX.configs['recommended-typescript'],
60+
reactX.configs["recommended-typescript"],
6261
// Enable lint rules for React DOM
6362
reactDom.configs.recommended,
6463
],
6564
languageOptions: {
6665
parserOptions: {
67-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
66+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
6867
tsconfigRootDir: import.meta.dirname,
6968
},
7069
// other options...
7170
},
7271
},
73-
])
74-
72+
]);
7573
```

‎web/eslint.config.js‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
6-
import { defineConfig, globalIgnores } from 'eslint/config'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
import { defineConfig, globalIgnores } from "eslint/config";
77

88
export default defineConfig([
9-
globalIgnores(['dist']),
9+
globalIgnores(["dist"]),
1010
{
11-
files: ['**/*.{ts,tsx}'],
11+
files: ["**/*.{ts,tsx}"],
1212
extends: [
1313
js.configs.recommended,
1414
tseslint.configs.recommended,
@@ -19,4 +19,4 @@ export default defineConfig([
1919
globals: globals.browser,
2020
},
2121
},
22-
])
22+
]);

‎web/package-lock.json‎

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎web/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"eslint-plugin-react-hooks": "^7.1.1",
2424
"eslint-plugin-react-refresh": "^0.5.3",
2525
"globals": "^17.7.0",
26+
"prettier": "^3.9.6",
2627
"typescript": "~6.0.2",
2728
"typescript-eslint": "^8.65.0",
2829
"vite": "^8.2.0"

0 commit comments

Comments
 (0)