Repository navigation
updated with new cicd #8
Workflow file for this run
This file contains hidden or 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
| name: Debug + CI/CD | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| jobs: | |
| debug-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Show repository root contents (DEBUG) | |
| run: | | |
| echo "=== Repository root contents ===" | |
| ls -la | |
| echo "=== Does requirements.txt exist? ===" | |
| if [ -f requirements.txt ]; then | |
| echo "YES → requirements.txt FOUND" | |
| echo "First 10 lines:" | |
| head -10 requirements.txt | |
| else | |
| echo "NO → requirements.txt NOT FOUND" | |
| echo "Listing all files recursively:" | |
| find . -name "*.txt" | head -20 | |
| exit 1 | |
| fi | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run tests | |
| run: | | |
| pytest tests/ || echo "No tests or tests failed" | |
| deploy: | |
| needs: debug-and-test | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build & Push Docker | |
| run: | | |
| docker build -t yourorg/validation:latest . | |
| echo ${{ secrets.DOCKER_PASS }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin | |
| docker push yourorg/validation:latest |