Skip to content
Open
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
91 changes: 91 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
name: Checkout repository
uses: actions/checkout@v3

name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Adjust to match your project

name: Install dependencies
run: npm ci

build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test

name: End-to-end tests
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cypress run
uses: cypress-io/github-action@v1

name: Auto Merge Dev to Main

on:
push:
branches:
- dev # Change this to the branch you want to merge from

jobs:
auto-merge:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Merge dev into main
run: |
git checkout main
git pull origin main
git merge --no-ff dev -m "Auto-merge dev into main"
git push origin main
2 changes: 1 addition & 1 deletion controllers/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const SessionsController = {
},

Create: (req, res) => {
console.log("trying to log in");
console.log("trying to log in there");
const email = req.body.email;
const password = req.body.password;

Expand Down
Loading