Skip to content

Commit

Permalink
Update ci-cd.dev.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail-Mouyahada authored Aug 28, 2024
1 parent f29aa1b commit 5ef3da7
Showing 1 changed file with 93 additions and 84 deletions.
177 changes: 93 additions & 84 deletions .github/workflows/ci-cd.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,90 +17,90 @@ env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

jobs:
deps-vulnerability:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# deps-vulnerability:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

- name: Create lock file
run: |
cd ./satsquare
npm install --package-lock-only
# - name: Create lock file
# run: |
# cd ./satsquare
# npm install --package-lock-only

- name: Install dependencies
run: |
cd ./satsquare
npm ci
npm update
# - name: Install dependencies
# run: |
# cd ./satsquare
# npm ci
# npm update

- name: Install jest-environment-jsdom
run: |
cd ./satsquare
npm install jest-environment-jsdom --save-dev
# - name: Install jest-environment-jsdom
# run: |
# cd ./satsquare
# npm install jest-environment-jsdom --save-dev

- name: Audit npm dependencies
run: |
cd ./satsquare
npm audit --audit-level=moderate
# - name: Audit npm dependencies
# run: |
# cd ./satsquare
# npm audit --audit-level=moderate

lint:
needs: deps-vulnerability
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# lint:
# needs: deps-vulnerability
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ./satsquare
npm ci
# - name: Install dependencies
# run: |
# cd ./satsquare
# npm ci

- name: Run Linting
run: |
cd ./satsquare
npm run lint
# - name: Run Linting
# run: |
# cd ./satsquare
# npm run lint

unit-tests:
# needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# unit-tests:
# # needs: lint
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ./satsquare
npm ci
npm i jest-environment-jsdom jest
# - name: Install dependencies
# run: |
# cd ./satsquare
# npm ci
# npm i jest-environment-jsdom jest

- name: Run Jest Unit Tests
run: |
cd ./satsquare
npm run test
# - name: Run Jest Unit Tests
# run: |
# cd ./satsquare
# npm run test

codecov:
# needs: unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# codecov:
# # needs: unit-tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ./satsquare
npm ci
npm i jest-environment-jsdom jest
# - name: Install dependencies
# run: |
# cd ./satsquare
# npm ci
# npm i jest-environment-jsdom jest

- name: Run tests and generate coverage report
run: |
cd ./satsquare
npm run test -- --coverage
# - name: Run tests and generate coverage report
# run: |
# cd ./satsquare
# npm run test -- --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}

# security:
# # needs: codecov
Expand All @@ -119,22 +119,22 @@ jobs:
# mobb-api-token: ${{ secrets.MOBB_API_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}

lighthouse:
# needs: security
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# lighthouse:
# # needs: security
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ./satsquare
npm install
# - name: Install dependencies
# run: |
# cd ./satsquare
# npm install

- name: Run Lighthouse CI
run: |
cd ./satsquare
npx lhci autorun
# - name: Run Lighthouse CI
# run: |
# cd ./satsquare
# npx lhci autorun

# docker-build:
# # needs: lighthouse
Expand Down Expand Up @@ -173,8 +173,17 @@ jobs:

- name: Install dependencies
run: |
export DATABASE_URL=postgresql://dev:tT8s758l79WDINR8tKHtfKBr1oiWXpWY@dpg-cr7ervi3esus7388bamg-a.frankfurt-postgres.render.com/dev_db_satsquare
export NEXTAUTH_SECRET="CP912ECDSClsdezoPDZCMSJXCPISJCIY20SmfdsFOYDflHZORdsvdsFOZIRGOIZHGOURHZ"
export NEXT_PUBLIC_LNURL_AUTH_PUBLIC_KEY="02c3b844b8104f0c1b15c507774c9ba7fc609f58f343b9b149122e944dd20c9362"
export NEXT_PUBLIC_SITE_URL="http://localhost:3000"
export NEXT_PUBLIC_SOCKET_URL="ws://localhost:5157"
export REDIS_URL="redis://localhost:6379"
cd ./satsquare
npm install
npx prisma migrate
npx prisma db psuh
npm run seed
- name: Run end-to-end tests
run: |
Expand Down

0 comments on commit 5ef3da7

Please sign in to comment.