Skip to content

Commit 3c08a0c

Browse files
authored
Create main.yml for CI/CD
Create main.yml for CI/CD
1 parent fa250e0 commit 3c08a0c

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: GitHub CD/CD test case for unittest
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
23+
- name: Set environment variable
24+
run: |
25+
echo '${{ secrets.CONFIG_JSON }}' > config.json && cat config.json
26+
27+
- name: Run unit tests
28+
run: |
29+
python -m unittest discover

0 commit comments

Comments
 (0)