0.2 release

This commit is contained in:
Sonny 2020-04-15 22:07:12 +02:00
parent 747c6416d4
commit 18479a3f56
340 changed files with 27295 additions and 0 deletions

7
gitlab-ci/build.yml Normal file
View file

@ -0,0 +1,7 @@
static:
stage: build
image: node:12
before_script:
- npm install
script:
- npm run build

16
gitlab-ci/deploy.yml Normal file
View file

@ -0,0 +1,16 @@
deploy:
stage: deploy
image: debian:buster
environment:
name: production
url: rss.fudiggity.nl
before_script:
- apt-get update && apt-get install -y ansible git
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.fudiggity.nl/sonny/ansible-playbooks.git deployment
- mkdir /root/.ssh
- echo "192.168.178.63 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILbtcdgJBhVCKsO88cV19EYefDTopdYejEQCp1pYr1Ga" > /root/.ssh/known_hosts
- echo "$DEPLOY_KEY" > deployment/deploy_key && chmod 0600 deployment/deploy_key
script:
- ansible-playbook deployment/playbook.yml --inventory deployment/apps.yml --limit newsreader --user ansible --private-key deployment/deploy_key
only:
- master

22
gitlab-ci/lint.yml Normal file
View file

@ -0,0 +1,22 @@
python-linting:
stage: lint
allow_failure: true
image: python:3.7.4-slim-stretch
before_script:
- pip install poetry
- poetry config cache-dir ~/.cache/poetry
- poetry config virtualenvs.in-project true
- poetry install --no-interaction
script:
- poetry run isort src/ --check-only --recursive
- poetry run black src/ --line-length 88 --check
- poetry run autoflake src/ --check --recursive --remove-all-unused-imports --ignore-init-module-imports
javascript-linting:
stage: lint
allow_failure: true
image: node:12
before_script:
- npm install
script:
- npm run lint

23
gitlab-ci/test.yml Normal file
View file

@ -0,0 +1,23 @@
python-tests:
stage: test
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
services:
- postgres:11
- memcached:1.5.22
image: python:3.7.4-slim-stretch
before_script:
- pip install poetry
- poetry config cache-dir .cache/poetry
- poetry config virtualenvs.in-project true
- poetry install --no-interaction
script:
- poetry run coverage run src/manage.py test newsreader
- poetry run coverage report
javascript-tests:
stage: test
image: node:12
before_script:
- npm install
script:
- npm test