Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first try deploiement raspberry #24

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 5 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ jobs: # Jobs de l'action
npm test
mv ./test-report.html ./back-jest-report.html

# - name: run back server # execution du serveur backend afin de pouvoir executer l'ensemble des tests du front
# run: |
# cd server
# npm run watch &

- name: Run front Jest tests # execution des tests Jest du frontend
- name: Run front Jest tests # execution des tests Jest du frontendD
run: |
cd client
npm test
Expand All @@ -66,73 +61,8 @@ jobs: # Jobs de l'action
./client/front-jest-report.html
./server/back-jest-report.html

Eslint-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install front dependencies
run: |
npm ci
working-directory: client

- name: Install back dependencies
run: |
npm ci
working-directory: server

- name: Where am i
run: |
pwd
ls

- name: Where am i server
run: |
pwd
ls -la
working-directory: server

- name: Where am i client
run: |
pwd
ls -la
working-directory: client

- name: Create eslint directory if not exists
run: mkdir -p eslint
working-directory: server

- name: Create eslint directory if not exists
run: mkdir -p eslint
working-directory: client

- name: Run front Eslint test
run: |
npm run lint || true
working-directory: client

- name: Run back Eslint test
run: |
npm run lint || true
working-directory: server

- name: Eslint reports
uses: actions/upload-artifact@v3
with:
name: eslint reports
path: |
client/eslint-report.html
server/eslint-report.html

build-and-push:
needs: [Jest-tests, Eslint-test]
needs: [Jest-tests]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -165,21 +95,21 @@ jobs: # Jobs de l'action
run: |
echo "DB_USER_PASS=${{ secrets.DB_USER_PASS }}" > ./server/config/.env
cat ./server/config/.env
echo "REACT_APP_URL_API=${{ secrets.REACT_APP_URL_API }}" > ./client/.env
echo "REACT_APP_URL_API=${{ secrets.REACT_APP_URL_API_RASPBERRY }}" > ./client/.env
cat ./client/.env

- name: Build front
if: ${{ success() }}
env:
REACT_APP_URL_API: ${{ secrets.REACT_APP_URL_API }}
REACT_APP_URL_API: ${{ secrets.REACT_APP_URL_API_RASPBERRY }}
run: |
cd client
npm run build

- name: Build and push front
uses: docker/build-push-action@v2
env:
REACT_APP_URL_API: ${{ secrets.REACT_APP_URL_API }}
REACT_APP_URL_API: ${{ secrets.REACT_APP_URL_API_RASPBERRY }}
with:
context: ./client/
file: ./client/Dockerfile
Expand Down
59 changes: 0 additions & 59 deletions .github/workflows/logging.yml

This file was deleted.

Loading
Loading