Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix adding workflows #2

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn

- name: Enable yarn
run: corepack enable

- name: log yarn
run: echo "$(yarn --version)"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn

- name: Build with Nest.js
run: yarn build

- name: Lint code
run: yarn lint
17 changes: 17 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "yarn"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check the npm registry for updates every day (weekdays)
schedule:
interval: "daily"

# Enable version updates for Docker
- package-ecosystem: "npm"
# Look for a `Dockerfile` in the `root` directory
directory: "/"
# Check for updates once a week
schedule:
interval: "weekly"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"precommit": "lint-staged",
"prepare": "husky",
"prepush": "echo",
Expand Down
6 changes: 5 additions & 1 deletion src/modules/user/user.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

@AllowUnauthorizedRequest()
@Mutation(() => GqlUserWithToken, { name: 'login' })
login(@Args('loginUserInput') loginUserInput: LoginUserInput) {
login(
@Args('loginUserInput')
loginUserInput:

Check failure on line 20 in src/modules/user/user.resolver.ts

View workflow job for this annotation

GitHub Actions / build

Delete `⏎·····`

Check failure on line 20 in src/modules/user/user.resolver.ts

View workflow job for this annotation

GitHub Actions / build

Delete `⏎·····`
LoginUserInput,
) {
return this.userService.login(loginUserInput);
}

Expand Down
Loading