Skip to content

make a report

make a report #68

Workflow file for this run

name: Build, Test and Push
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Run lint tests
run: npm run lint
- name: Run unit tests
run: npm run test
- name: Run Performance tests
uses: treosh/lighthouse-ci-action@v2
with:
budgetPath: ./budget.json
uploadArtifacts: true
temporaryPublicStorage: true
- name: Dependency Check
uses: dependency-check/Dependency-Check_Action@main
with:
project: 'messaging-app'
path: '.'
format: 'HTML'
out: 'reports'
args: >
--failOnCVSS 7
--enableRetired
- name: Upload Dependency Check Test results
uses: actions/upload-artifact@master
with:
name: Dependency Check report
path: ${{github.workspace}}/reports
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and run docker containers
run: |
docker-compose up -d && \
docker ps && sleep 5
- name: Build and push to Docker Hub
uses: docker/[email protected]
with:
context: .
push: true
tags: dasha12678/messaging-app:latest