Skip to content

Commit

Permalink
Some changes to execute in sequential
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocristian committed Apr 29, 2024
1 parent 35a27c3 commit c2756c1
Showing 1 changed file with 48 additions and 24 deletions.
72 changes: 48 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
name: Build
name: Build-sequential
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
- ft_trysequential
jobs:
unit-tests:

tear-down:
name: Deploy over SSH
runs-on: ubuntu-latest

steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_es05c/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es05c/master/.env -O .env
docker compose --profile prod down
e2e-tests:
needs: [unit-tests]
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm --prefix users/authservice ci
- run: npm --prefix users/userservice ci
- run: npm --prefix gatewayservice ci
- run: npm --prefix webapp ci
- run: npm --prefix questionservice ci
- run: npm --prefix historyservice ci
- run: npm --prefix roomservice ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
- run: npm --prefix gatewayservice test -- --coverage
- run: npm --prefix roomservice test -- --coverage
- run: npm --prefix questionservice test -- --coverage
- run: npm --prefix historyservice test -- --coverage
- run: npm --prefix webapp test -- --coverage
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- run: npm --prefix users/authservice install
- run: npm --prefix users/userservice install
- run: npm --prefix gatewayservice install
- run: npm --prefix historyservice install
- run: npm --prefix questionservice install
- run: npm --prefix roomservice install
- run: npm --prefix webapp install
- run: npm --prefix webapp run build
- run: npm --prefix webapp run test:e2e --runInBand
env :
CI : ""

deploy:
name: Deploy over SSH
runs-on: ubuntu-latest

steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_es05c/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_es05c/master/.env -O .env
docker compose --profile prod up -d --pull always

0 comments on commit c2756c1

Please sign in to comment.