[Patchew-devel] [PATCH 2/2] ci: Add github action

Fam Zheng posted 2 patches 2 years, 6 months ago
[Patchew-devel] [PATCH 2/2] ci: Add github action
Posted by Fam Zheng 2 years, 6 months ago
From: Fam Zheng <fam@euphon.net>

Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>
---
 .github/workflows/django.yml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 .github/workflows/django.yml

diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml
new file mode 100644
index 0000000..6aa97f7
--- /dev/null
+++ b/.github/workflows/django.yml
@@ -0,0 +1,32 @@
+name: Django CI
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 4
+      matrix:
+        python-version: [3.7, 3.8, 3.9]
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install Dependencies
+      run: |
+        python -m pip install --upgrade pip
+    - name: Run Tests
+      run: |
+        python3 -m venv ./venv
+        . venv/bin/activate
+        pip install -r requirements.txt
+        python manage.py test
-- 
2.25.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel