Compare commits
7 Commits
2c60d86177
...
cicd
| Author | SHA1 | Date | |
|---|---|---|---|
| cfa4abd9ac | |||
| 30cc665f05 | |||
| 80690a9c8c | |||
| 29f51663a5 | |||
| 8913e63997 | |||
| 46956e971c | |||
| 4252fadc8d |
36
.gitea/workflows/UnitTests.yaml
Normal file
36
.gitea/workflows/UnitTests.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Run Tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
|
||||
- name: Install dependencies if requirements.txt exists
|
||||
run: |
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
if [ -f requirements.txt ]; then
|
||||
pip install --no-deps -r requirements.txt
|
||||
else
|
||||
echo "No requirements.txt found, skipping installation."
|
||||
fi
|
||||
|
||||
- name: Read .env from server and write to current directory
|
||||
run: |
|
||||
cat /home/jhaeder/.env > .env
|
||||
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
python3 manage.py test
|
||||
Reference in New Issue
Block a user