This commit is contained in:
Sonny Bakker 2023-07-02 10:23:16 +02:00
parent 6b2c4996d5
commit 8e7b059ad3
97 changed files with 15077 additions and 6892 deletions

View file

@ -1,6 +1,6 @@
static:
stage: build
image: node:12
image: node:16-bullseye
before_script:
- npm install
script:

View file

@ -1,22 +0,0 @@
deploy:
stage: deploy
image: python:3.7
environment:
name: production
url: rss.fudiggity.nl
rules:
- if: $CI_COMMIT_TAG
before_script:
- pip install ansible --quiet
- git clone https://git.fudiggity.nl/ansible/newsreader.git deployment --branch master
- cd deployment
- ansible-galaxy install -r requirements.yml
- mkdir /root/.ssh && echo "$DEPLOY_HOST_KEY" > /root/.ssh/known_hosts
- echo "$DEPLOY_KEY" > deploy_key && chmod 0600 deploy_key
- echo "$VAULT_PASSWORD" > vault
script:
- >
ansible-playbook playbook.yml
--private-key deploy_key
--vault-password-file vault
--extra-vars "app_branch=$CI_COMMIT_TAG"

View file

@ -1,15 +1,12 @@
python-linting:
stage: lint
image: python:3.7
image: python:3.9-bullseye
before_script:
- pip install poetry --quiet
- poetry config cache-dir ~/.cache/poetry
- poetry config virtualenvs.in-project true
- poetry install --no-interaction --quiet
- pip install -r requirements/ci.txt
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
- isort src/ --check-only
- black src/ --line-length 88 --check
- autoflake src/ --check --recursive --remove-all-unused-imports --ignore-init-module-imports
only:
refs:
- development
@ -17,7 +14,7 @@ python-linting:
javascript-linting:
stage: lint
image: node:12
image: node:16-bullseye
before_script:
- npm install
script:

View file

@ -2,21 +2,17 @@ python-tests:
stage: test
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
services:
- postgres:11
- postgres:15
- memcached:1.5.22
image: python:3.7
image: python:3.9-bullseye
before_script:
- pip install poetry --quiet
- poetry config cache-dir .cache/poetry
- poetry config virtualenvs.in-project true
- poetry install --no-interaction --quiet --extras sentry
- pip install -r requirements/ci.txt
script:
- poetry run coverage run src/manage.py test newsreader
- poetry run coverage report
- coverage run ./src/manage.py test newsreader
javascript-tests:
stage: test
image: node:12
image: node:16-bullseye
before_script:
- npm install
script: