Skip to content

monorepo ci workflow added #4

monorepo ci workflow added

monorepo ci workflow added #4

Workflow file for this run

name: Monorepo CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Django dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/production.txt
- name: Run Django tests
run: echo "No tests to run"
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_FRONTEND_URL: ${{ secrets.NEXT_PUBLIC_FRONTEND_URL }}
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: 1
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install Next.js dependencies
run: |
npm ci
npm install --save-dev tailwindcss postcss autoprefixer sharp
- name: Verify installed packages
run: npm list tailwindcss postcss autoprefixer sharp
- name: Setup PostCSS
run: |
echo "module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}" > postcss.config.js
- name: Setup Tailwind CSS
run: |
echo "module.exports = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {},
},
plugins: [],
}" > tailwind.config.js
# - name: Build Next.js app
# run: npm run build -- --debug
# env:
# NEXT_TELEMETRY_DISABLED: 1
# NODE_ENV: production
- name: Run Next.js tests
run: echo "No tests to run"