Skip to content

Commit 275a1f1

Browse files
Merge pull request #3 from bit-systems/updated-workflows
fix adding workflows
2 parents 30bd84a + 662afc0 commit 275a1f1

File tree

4 files changed

+73
-2
lines changed

4 files changed

+73
-2
lines changed

.github/workflows/ci.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
# Triggers the workflow on push or pull request events but only for the main branch
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
# Build job
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: yarn
23+
24+
- name: Enable yarn
25+
run: corepack enable
26+
27+
- name: log yarn
28+
run: echo "$(yarn --version)"
29+
30+
- name: Get yarn cache directory path
31+
id: yarn-cache-dir-path
32+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
33+
34+
- uses: actions/cache@v3
35+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
36+
with:
37+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
38+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-yarn-
41+
42+
- name: Install dependencies
43+
run: yarn
44+
45+
- name: Build with Nest.js
46+
run: yarn build
47+
48+
- name: Lint code
49+
run: yarn lint

.github/workflows/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "yarn"
5+
# Look for `package.json` and `lock` files in the `root` directory
6+
directory: "/"
7+
# Check the npm registry for updates every day (weekdays)
8+
schedule:
9+
interval: "daily"
10+
11+
# Enable version updates for Docker
12+
- package-ecosystem: "npm"
13+
# Look for a `Dockerfile` in the `root` directory
14+
directory: "/"
15+
# Check for updates once a week
16+
schedule:
17+
interval: "weekly"

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"scripts": {
99
"build": "nest build",
1010
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
11-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
11+
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
12+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
1213
"precommit": "lint-staged",
1314
"prepare": "husky",
1415
"prepush": "echo",

src/modules/user/user.resolver.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ export class UserResolver {
1515

1616
@AllowUnauthorizedRequest()
1717
@Mutation(() => GqlUserWithToken, { name: 'login' })
18-
login(@Args('loginUserInput') loginUserInput: LoginUserInput) {
18+
login(
19+
@Args('loginUserInput')
20+
loginUserInput:
21+
LoginUserInput,
22+
) {
1923
return this.userService.login(loginUserInput);
2024
}
2125

0 commit comments

Comments
 (0)