Skip to content

Commit

Permalink
chore: adding initial code with CI and stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jun 13, 2024
1 parent 719debe commit 9ea986d
Show file tree
Hide file tree
Showing 30 changed files with 1,439 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

<!--
For general questions please use the Discussions section of the project:
https://github.com/varfish-org/varfish-server/discussions
For bug reports and feature requests please open a ticket using the templates!
-->

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

<!--
For general questions please use the Discussions section of the project:
https://github.com/varfish-org/varfish-server/discussions
For bug reports and feature requests please open a ticket using the templates!
-->

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
NOTE
NOTE In most cases, you should create an issue first, and only then
NOTE a pull request. Please see the contribution guidelines for
NOTE further information. In particular related to conventional
NOTE commit messages.
NOTE
The title should have the following format:
<type>: description (#<issue>)
-->
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/dependabot.yml~
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "npm"
directory: "/varfish/vueapp"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dependabot auto-merge

on: pull_request

permissions:
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
# GitHub provides this variable in the CI env. You don't
# need to add anything to the secrets vault.
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/conventional-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
title-format:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
19 changes: 19 additions & 0 deletions .github/workflows/deps-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

name: Dependencies report

on:
pull_request:

jobs:
build:
name: Dependencies report
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: deps-report
uses: MeilleursAgents/deps-report@master
with:
file: /Pipfile.lock
github_token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/deps-report.yml~
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

name: Dependencies report

on:
pull_request:

jobs:
build:
name: Dependencies report
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: deps-report
uses: MeilleursAgents/deps-report@master
with:
file: backend/Pipfile.lock
github_token: ${{ secrets.GITHUB_TOKEN }}
82 changes: 82 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI

on:
- push
- pull_request

jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
lfs: true

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install pip and Pipenv
run: |
pip install -U pip pipenv
working-directory: src

- name: Install project dependencies with pipenv
run: |
pipenv install --verbose --categories=packages,dev-packages
working-directory: src

- name: Install the package itself
run: |
pipenv install .
working-directory: src

- name: Run tests
run: |
pipenv run make test
working-directory: src

# - name: Upload Python coverage reports to Codecov
# uses: codecov/codecov-action@v4
# with:
# flags: python
# directory: backend
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
lfs: true

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install pip and Pipenv
run: |
pip install -U pip pipenv
working-directory: src

- name: Install project dependencies with pipenv
run: |
pipenv install --verbose --categories=packages,dev-packages
working-directory: src

- name: Install the package itself
run: |
pipenv install .
working-directory: src

- name: Run all lints
run: |
pipenv run make lint
working-directory: src
Loading

0 comments on commit 9ea986d

Please sign in to comment.