Skip to content

Commit

Permalink
Create new workflow for Build and Test for all branch without SonarQu…
Browse files Browse the repository at this point in the history
…be to accomodate TDD test phase
  • Loading branch information
JohannesSetiawan committed Feb 22, 2024
1 parent 8079332 commit 5b69146
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/django-build-test-allbranch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Test

on:
push:
branches:
- '*'

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.11]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set Up Environment Variables
run: |
echo "DB_HOST=${{ secrets.DB_HOST }}" >> .env
echo "DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }}" >> .env
echo "DB_NAME=${{ secrets.DB_NAME }}" >> .env
echo "DB_USER=${{ secrets.DB_USER }}" >> .env
echo "DB_PASS=${{ secrets.DB_PASS }}" >> .env
cp .env revelio/.env
- name: Run Tests
run: |
python manage.py test

0 comments on commit 5b69146

Please sign in to comment.