Skip to content

Commit

Permalink
rename backend into debiaiServer for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
FadyCoding committed Jul 19, 2024
1 parent 90f2396 commit ead0c40
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- reopened

jobs:
black-format-check: # Check that the backend codebase is formatted with black
black-format-check: # Check that the debiaiServer codebase is formatted with black
name: Black format check
runs-on: ubuntu-latest
steps:
Expand All @@ -19,12 +19,12 @@ jobs:
python-version: 3.8
- name: Install dependencies and check black format
run: |
cd backend
cd debiaiServer
python -m pip install --upgrade pip
pip install black
black --check --diff .
flake8-check: # Check that the backend codebase does not contain linting errors
flake8-check: # Check that the debiaiServer codebase does not contain linting errors
name: Flake8 check
runs-on: ubuntu-latest
steps:
Expand All @@ -35,7 +35,7 @@ jobs:
python-version: 3.8
- name: Install dependencies and check flake8 format
run: |
cd backend
cd debiaiServer
python -m pip install --upgrade pip
pip install flake8
flake8 .
Expand Down Expand Up @@ -73,18 +73,18 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Check that the version in backend and frontend are the same
- name: Check that the version in debiaiServer and frontend are the same
id: version-check
run: |
cd frontend
FRONTEND_VERSION=$(cat package.json | grep -m1 version | cut -d '"' -f 4)
cd ../backend
cd ../debiaiServer
BACKEND_VERSION=$(cat swagger.yaml | grep -m1 version | cut -d ':' -f 2 | sed 's/ //g')
if [ "$FRONTEND_VERSION" != "$BACKEND_VERSION" ]; then
echo "Version mismatch: frontend/package.json version '$FRONTEND_VERSION' != backend/swagger.yaml version '$BACKEND_VERSION'."
echo "Version mismatch: frontend/package.json version '$FRONTEND_VERSION' != debiaiServer/swagger.yaml version '$BACKEND_VERSION'."
exit 1
fi
echo "Version match: frontend/package.json version '$FRONTEND_VERSION' == backend/swagger.yaml version '$BACKEND_VERSION'."
echo "Version match: frontend/package.json version '$FRONTEND_VERSION' == debiaiServer/swagger.yaml version '$BACKEND_VERSION'."
echo "BRANCH_VERSION=$FRONTEND_VERSION" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
Expand Down Expand Up @@ -146,13 +146,13 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cd backend
cd debiaiServer
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
- name: Test with pytest
run: |
cd backend
cd debiaiServer
python websrv.py & sleep 5 && pytest tests/
docker-build-check: # Build the docker image and check that it can run
Expand Down

0 comments on commit ead0c40

Please sign in to comment.