Skip to content

feat: implement backend functionality for interview question suggestion #34

feat: implement backend functionality for interview question suggestion

feat: implement backend functionality for interview question suggestion #34

Workflow file for this run

name: CI for BE
on:
pull_request:
branches: [ "main" ]
paths:
- 'be_repo/**'
permissions:
contents: write
checks: write
pull-requests: write
jobs:
live-test:
name: Live Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./be_repo
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build coverage file
run: |
pytest --ignore=tests/test_e2e.py --junitxml=pytest.xml \
--cov=app --cov=modules \
--cov-report=term-missing:skip-covered tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./be_repo/pytest-coverage.txt
junitxml-path: ./be_repo/pytest.xml
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Update Readme with Coverage Html
run: |
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.coverageHtml }}\n<!-- Pytest Coverage Comment:End -->' ../README.md
- name: Commit & Push changes to Readme
uses: actions-js/push@master
with:
branch: |

Check failure on line 68 in .github/workflows/ci_be.yml

View workflow run for this annotation

GitHub Actions / CI for BE

Invalid workflow file

The workflow is not valid. .github/workflows/ci_be.yml (Line: 68, Col: 19): Unexpected symbol: '('. Located at position 73 within expression: github.ref_name == 'main' && 'dev/backend' || github.ref_name.startsWith('be/') && github.ref_name || 'dev/backend'
${{ github.ref_name == 'main' && 'dev/backend' || github.ref_name.startsWith('be/') && github.ref_name || 'dev/backend' }}
message: Update coverage on Readme
github_token: ${{ secrets.GITHUB_TOKEN }}