Add Gitea Actions CI: run tests, package artifact zip on push
CI / test-and-package (push) Failing after 1m21s
CI / test-and-package (push) Failing after 1m21s
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test-and-package:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Run tests
|
||||
run: python -m pytest tests/ -v
|
||||
|
||||
- name: Package artifact
|
||||
run: |
|
||||
zip -r meal-tracker.zip . \
|
||||
-x ".git/*" \
|
||||
-x ".gitea/*" \
|
||||
-x ".env" \
|
||||
-x "docker-compose.yml" \
|
||||
-x ".pytest_cache/*" \
|
||||
-x "__pycache__/*" \
|
||||
-x "meals.db"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: meal-tracker
|
||||
path: meal-tracker.zip
|
||||
Reference in New Issue
Block a user