Skip to content

Commit

Permalink
feat: initialize project template repo
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Sep 20, 2023
1 parent 346f9e2 commit 43e0682
Show file tree
Hide file tree
Showing 32 changed files with 587 additions and 2,563 deletions.
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"contributorsPerLine": 7,
"projectName": "project-template",
"projectOwner": "litestar-org",
"projectOwner": "jolt-org",
"repoType": "github",
"repoHost": "https://github.com",
"commitConvention": "angular",
Expand Down
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code owner settings for `jolt-org`
# @maintainers should be assigned to all reviews.
# Most specific assignment takes precedence though, so if you add a more specific thing than the `*` glob, you must also add @maintainers
# For more info about code owners see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-example

# Global Assignment
* @jolt-org/maintainers @jolt-org/members
83 changes: 0 additions & 83 deletions .github/ISSUE_TEMPLATE/BUG.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/DOCS.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/ISSUE_TEMPLATE/REQUEST.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/dependabot.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Continuous Deployment

on:
push:
tags:
- "v*.*.*"

jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-22.04
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate a changelog
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: pyproject.toml
args: -vv --latest --strip header
env:
OUTPUT: docs/CHANGELOG.rst
101 changes: 57 additions & 44 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests and Linting
name: Tests And Linting

on:
pull_request:
Expand All @@ -24,67 +24,80 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit-|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}

- name: Execute Pre-Commit
run: pre-commit run --show-diff-on-failure --color=always --all-files

test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
uses: ./.github/workflows/test.yaml
with:
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.11' }}
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v4

test-platform-compat:
if: github.event_name == 'push'
strategy:
fail-fast: true
matrix:
os: ["macos-latest", "windows-latest"]
uses: ./.github/workflows/test.yaml
with:
python-version: "3.11"
os: ${{ matrix.os }}
- name: Install Microsoft ODBC Drivers
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y

sonar:
- uses: pdm-project/setup-pdm@v3
name: Set up PDM
with:
python-version: ${{ matrix.python-version }}
allow-python-prereleases: true
cache: true

- name: Install dependencies
run: pdm install

- name: Test
run: pdm run pytest -m "" -n auto

build-docs:
needs:
- test
- validate
if: github.event.pull_request.head.repo.fork == false && github.repository_owner == 'litestar-org'
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v3

- name: Install Microsoft ODBC
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y

- name: Set up Python
uses: actions/setup-python@v4
with:
name: coverage-xml
- name: Fix coverage file for sonarcloud
run: sed -i "s/home\/runner\/work\/litestar\/litestar/github\/workspace/g" coverage.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
python-version: "3.11"

- uses: pdm-project/setup-pdm@v3
name: Set up PDM
with:
python-version: "3.11"
allow-python-prereleases: true
cache: true

- name: Install dependencies
run: pdm install -G:docs

- name: Build docs
run: pdm run make docs

- name: Save PR number
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
run: echo $PR_NUMBER > .pr_number

codeql:
needs:
- test
- validate
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL Without Dependencies
uses: github/codeql-action/init@v2
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
setup-python-dependencies: false
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
name: docs-preview
path: |
docs/_build/html
.pr_number
22 changes: 0 additions & 22 deletions .github/workflows/codeql.yml

This file was deleted.

Loading

0 comments on commit 43e0682

Please sign in to comment.