generated from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some changes to execute in sequential
- Loading branch information
1 parent
35a27c3
commit c2756c1
Showing
1 changed file
with
48 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |