-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.53 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@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() }}
name: Create Issue on Failed workflow
uses: dacbd/create-issue-action@main
with:
token: ${{ github.token }}
title: Action workflow failed.
body: |
### Context
[Failed Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
[Codebase](https://github.com/${{ github.repository }}/tree/${{ github.sha }})
Workflow name - `${{ github.workflow }}`
Job - `${{ github.job }}`
status - `${{ job.status }}`
assignees: lowkh
# 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"