From 70379a149be01915a72943fd0056aef305850f1c Mon Sep 17 00:00:00 2001 From: kek20009 Date: Wed, 30 Oct 2024 20:16:15 -0400 Subject: [PATCH] had an issue with the yaml hopefully this works better --- .github/workflows/ms5.yaml | 81 +++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ms5.yaml b/.github/workflows/ms5.yaml index 8acca7e..12212c0 100644 --- a/.github/workflows/ms5.yaml +++ b/.github/workflows/ms5.yaml @@ -12,44 +12,43 @@ jobs: python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 # Updated to correct version - - #Set up Python - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - #Install everything - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint flask flask_cors flasgger pytest - - #Run pylint on all Python files - - name: Analyze code with pylint - run: | - pylint $(git ls-files '*.py') - - #Build Docker Image for API - - name: Build API Docker Image - run: | - docker build -t api-image -f ./docker/dockerfile . - - - #tart Container - - name: Start API Container - run: | - docker run -d -p 5000:5000 --name api-container api-image - - #Start the API Service & Run All Tests - - name: Run all Python tests in directory - run: | - docker exec api-container pytest $(find . -name 'test_*.py') - - #End the testing - - name: Stop and Remove API Container - run: | - docker stop api-container - docker rm api-container + # Checkout code + - uses: actions/checkout@v2 # Updated to correct version + + #Set up Python + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + #Install everything + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint flask flask_cors flasgger pytest + + #Run pylint on all Python files + - name: Analyze code with pylint + run: | + pylint $(git ls-files '*.py') + + #Build Docker Image for API + - name: Build API Docker Image + run: | + docker build -t api-image -f ./docker/dockerfile . + + #Start Container + - name: Start API Container + run: | + docker run -d -p 5000:5000 --name api-container api-image + + #Start the API Service & Run All Tests + - name: Run all Python tests in directory + run: | + docker exec api-container pytest $(find . -name 'test_*.py') + + #End the testing + - name: Stop and Remove API Container + run: | + docker stop api-container + docker rm api-container