Update .gitea/workflows/test.yaml
CI Test with Python / test (push) Successful in 24s
Details
CI Test with Python / test (push) Successful in 24s
Details
This commit is contained in:
parent
2eb113076b
commit
94548fe7e1
|
@ -1,4 +1,4 @@
|
||||||
name: CI Test
|
name: CI Test with Python
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -12,5 +12,18 @@ jobs:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run a Test Script
|
- name: Install Python
|
||||||
run: echo "CI/CD Test Running!"
|
run: sudo apt update && sudo apt install -y python3 python3-pip
|
||||||
|
|
||||||
|
- name: Create a Sample Python Test
|
||||||
|
run: |
|
||||||
|
echo "import unittest" > test_sample.py
|
||||||
|
echo "class TestSample(unittest.TestCase):" >> test_sample.py
|
||||||
|
echo " def test_example(self):" >> test_sample.py
|
||||||
|
echo " assert 1 + 1 == 2" >> test_sample.py
|
||||||
|
echo "if __name__ == '__main__':" >> test_sample.py
|
||||||
|
echo " unittest.main()" >> test_sample.py
|
||||||
|
|
||||||
|
- name: Run the Python Test
|
||||||
|
run: python3 test_sample.py
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue