Skip to content

Commit 0b42b17

Browse files
committed
ci checks
1 parent b5d9247 commit 0b42b17

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

.github/workflows/BackendCI.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ jobs:
3434
run: go install github.com/swaggo/swag/cmd/swag@latest
3535
- name: Generate swagger docs
3636
run: make swagger
37+
- name: Check code formatting
38+
run: |
39+
gofmt_files=$(gofmt -l ./...)
40+
if [ -n "$gofmt_files" ]; then
41+
echo "The following files are not gofmt'd:"
42+
echo "$gofmt_files"
43+
exit 1
44+
fi
3745
- name: Run golangci-lint
3846
uses: golangci/golangci-lint-action@v6
3947
with:

.github/workflows/MobileCI.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
run: cd ../shared && npm run generate:api
4343
- name: Run ESLint
4444
run: npm run lint
45+
- name: Check code formatting
46+
run: npm run format:check
4547
mobile-typecheck:
4648
name: Type Check
4749
runs-on: ubuntu-latest

backend/.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
linters:
2+
enable:
3+
- gofmt
4+
- goimports
5+
6+
linters-settings:
7+
goimports:
8+
local-prefixes: github.com/selfserve

clients/mobile/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"android": "expo run:android",
99
"ios": "expo run:ios",
1010
"lint": "expo lint",
11+
"format:check": "prettier --check .",
1112
"test": "jest",
1213
"test:watch": "jest --watch",
1314
"test:coverage": "jest --coverage"
@@ -56,6 +57,7 @@
5657
"@types/react": "~19.1.0",
5758
"eslint": "^9.25.0",
5859
"eslint-config-expo": "~10.0.0",
60+
"prettier": "^3.5.3",
5961
"jest": "~29.7.0",
6062
"jest-expo": "^54.0.16",
6163
"react-native-dotenv": "^3.4.11",

clients/mobile/prettier.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @ts-check
2+
3+
/** @type {import('prettier').Config} */
4+
const config = {
5+
semi: false,
6+
singleQuote: true,
7+
trailingComma: 'all',
8+
}
9+
10+
module.exports = config

0 commit comments

Comments
 (0)