Skip to content

Update main.yaml

Update main.yaml #4586

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop, 'feature/**']
jobs:
tests:
runs-on: ubuntu-latest
steps:
# Checkout the Repo
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Install Node 18
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name : Npm Install
run: npm install
- name : Lint
run : npm run lint
- name : Test
run: npm test
- name : Check Path
run: ls -la && pwd && ls -la /
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: success() || failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Test_Docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Dockerfile.stage
uses: docker/build-push-action@v6
with:
push: false
file: ./docker/Dockerfile.stage
cache-from: type=gha
cache-to: type=gha, mode=max
tags: ci-dockerfile:stage
build-args: |
NGINX_VERSION=1.19.6
PROXY_API_URL=${secrets.API_URL}
password=${secrets.SERVER_PASS}
- name: test
run: docker images
- name: Run Docker Compose
run: docker compose --file "./compose-gh-ci.yaml" up nginx -d