Skip to content

Commit

Permalink
chore: move to gh action, dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Borer committed Mar 24, 2021
1 parent b8d5f16 commit 97e5e26
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 44 deletions.
22 changes: 22 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 1
update_configs:
- package_manager: "python"
directory: "/"
update_schedule: "live"
automerged_updates:
- match:
dependency_type: "development"
update_type: "semver:minor"
commit_message:
prefix: "chore"
include_scope: true
- package_manager: "docker"
directory: "/"
update_schedule: "daily"
commit_message:
prefix: "chore"
include_scope: true
ignored_updates:
- match:
dependency_name: "python"
version_requirement: ">=3.7"
13 changes: 13 additions & 0 deletions .github/workflows/auto-approve-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Auto approve dependabot

on:
pull_request_target

jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the project
run: |
echo "UID=$(id --user)" > .env
docker-compose up -d --build
- name: Lint the code
run: |
docker-compose exec -T interval black --check .
docker-compose exec -T interval flake8
- name: Run pytest
run: |
docker-compose exec -T interval wait-for-it.sh db:5432
docker-compose exec -T interval wait-for-it.sh caluma:8000
docker-compose exec -T interval pytest --no-cov-on-fail --cov
gitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install gitlint
run: pip install gitlint
- name: Run gitlint
run: gitlint --contrib contrib-title-conventional-commits
4 changes: 4 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[general]
ignore=body-is-missing

[ignore-by-title]
regex=^chore\(deps.*
ignore=title-max-length, body-is-missing, body-max-line-length, body-min-length
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

5 changes: 0 additions & 5 deletions renovate.json

This file was deleted.

0 comments on commit 97e5e26

Please sign in to comment.