Skip to content

Commit

Permalink
chore(): added node cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanVilla424 committed Oct 20, 2024
1 parent 274437c commit 7e8996c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node.js CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["22.x"]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install frontend dependencies
run: npm ci
working-directory: frontend
- name: Format frontend project
run: npm run format
working-directory: frontend
- name: Lint frontend project
run: npm run lint
working-directory: frontend
- name: Build Frontend project
run: npm run build --if-present
working-directory: frontend
18 changes: 10 additions & 8 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install backend dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install poetry
poetry lock
poetry install
- name: Format check with Black
working-directory: backend
- name: Format backend check with Black
run: |
source venv/bin/activate
black --check scripts/
# TODO: Solve PEP Errors
# - name: Lint with Pylint
# run: |
# source venv/bin/activate
# pylint $(git ls-files '*.py')
black --check . ../scripts/
working-directory: backend
- name: Lint backend with Pylint
run: |
source venv/bin/activate
pylint $(git ls-files '*.py')
working-directory: backend
11 changes: 11 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "frontend",
"version": "1.0.0",
"description": "frontend github cicd sample",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "JuanVilla424",
"license": "GPL-3.0-only"
}

0 comments on commit 7e8996c

Please sign in to comment.