forked from EGCETSII/decide_django_2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wadobo#95 from Full-Tortuga/feature/EGCETSII#43-ba…
…ckend-test Feature/EGCETSII#43 backend test
- Loading branch information
Showing
10 changed files
with
1,509 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,13 @@ jobs: | |
|
||
services: | ||
mongodb: | ||
image: mongo:3.4.23 | ||
image: mongo | ||
env: | ||
MONGO_INITDB_DATABASE: decide | ||
ports: | ||
- 27017:27017 | ||
options: --health-cmd mongo --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
ldap: | ||
image: carvilgar1us/decideldap | ||
ports: | ||
|
@@ -28,7 +32,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Install linux dependencies | ||
run: | | ||
sudo apt-get install build-essential python3-dev python2.7-dev libldap2-dev libsasl2-dev tox lcov valgrind | ||
sudo apt-get install build-essential python3-dev python2.7-dev libldap2-dev libsasl2-dev tox lcov valgrind libpq-dev | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
|
@@ -37,11 +41,28 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install codacy-coverage | ||
- name: Copy local_settings | ||
run: | | ||
cp ./decide/local_settings.example.py ./decide/local_settings.py | ||
- name: Migrate | ||
env: | ||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | ||
run: | | ||
cd decide | ||
python manage.py flush --noinput | ||
python manage.py sqlflush | ||
python manage.py makemigrations | ||
python manage.py migrate | ||
- name: Test administration module | ||
env: | ||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | ||
run: | | ||
python ./decide/manage.py test administration | ||
cd decide | ||
coverage run --branch --source=./administration/ ./manage.py test --settings=decide.test_settings administration --noinput -v 2 | ||
coverage xml | ||
- name: Codacy Coverage Reporter | ||
uses: codacy/[email protected] | ||
with: | ||
project-token: ${{ secrets.CODACY_API_TOKEN }} | ||
coverage-reports: decide/coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: React CI | ||
|
||
on: | ||
push: | ||
branches: [master, main, develop] | ||
pull_request: | ||
branches: [master, main, develop] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: | | ||
cd decide/administration/frontend && | ||
npm install | ||
- name: Build app | ||
run: | | ||
cd decide/administration/frontend && | ||
npm run build --if-present | ||
- name: Test app | ||
run: | | ||
cd decide/administration/frontend && | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.