Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
abbastoof authored Jun 3, 2024
1 parent e16f894 commit be45115
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Upgrade setuptools
run: pip install --upgrade setuptools

- name: Checkout code
uses: actions/checkout@v3 # Checkout the repository code

Expand All @@ -25,11 +22,15 @@ jobs:
with:
python-version: 3.11 # Use Python version 3.11

# Install project dependencies
- name: Install dependencies
# Install build dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip # Upgrade pip
pip install -r requirements.txt # Install dependencies from requirements.txt
pip install setuptools==58.0.4 wheel # Ensure setuptools and wheel are installed
# Install project dependencies
- name: Install dependencies
run: pip install -r requirements.txt # Install dependencies from requirements.txt

test:
needs: setup
Expand All @@ -43,15 +44,18 @@ jobs:
with:
python-version: 3.11

- name: Install dependencies
# Install build dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install setuptools==58.0.4 wheel
- name: Install dependencies
run: pip install -r requirements.txt

# Run test suite
- name: Run tests
run: |
pytest # Execute tests using pytest
run: pytest # Execute tests using pytest

security:
needs: setup
Expand All @@ -65,10 +69,14 @@ jobs:
with:
python-version: 3.11

- name: Install dependencies
# Install build dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install setuptools==58.0.4 wheel
- name: Install dependencies
run: pip install -r requirements.txt

# Run security checks
- name: Run security checks
Expand All @@ -88,15 +96,18 @@ jobs:
with:
python-version: 3.11

- name: Install dependencies
# Install build dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install setuptools==58.0.4 wheel
- name: Install dependencies
run: pip install -r requirements.txt

# Build the Docker image
- name: Build Docker image
run: |
docker build -t transcendence .
run: docker build -t transcendence .

deploy:
needs: build
Expand All @@ -117,5 +128,4 @@ jobs:
# Deploy to the server
- name: Deploy to server
run: |
ssh user@server "docker pull ${DOCKER_HUB_USERNAME}/transcendence:latest && docker-compose up --build -d"
run: ssh user@server "docker pull ${DOCKER_HUB_USERNAME}/transcendence:latest && docker-compose up --build -d"

0 comments on commit be45115

Please sign in to comment.