Wrote test cases for Sprint 1 #28
This file contains 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: Pull Request | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
python-version: 3.11 | |
- name: Install Libraries | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Checkout Own Repo | |
uses: actions/checkout@v2 | |
with: | |
repository: LWJ-Nicholas/DevOps_Oct2023_TeamC_Assignment | |
- name: list our contents | |
run: | | |
ls | |
- name: test with pytest | |
run: | | |
pytest test.py -v -cov --junitxml=report.xml | |
- if: ${{ failure() }} | |
uses: JasonEtco/create-an-issue@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
filename: .github/ISSUE_TEMPLATE.md | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: always() | |
with: | |
junit_files: "report.xml" | |
- name: create folder | |
run: mkdir downloads | |
- name: move files | |
run: mv *.xml ./downloads | |
- name: Upload document | |
uses: actions/upload-artifact@v2 | |
with: | |
name: assetDocuments | |
path: downloads | |