-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: improve CI/CD automation * feat: adopt [conventional commits](https://www.conventionalcommits.org/en/v1.0.0) * feat: use github actions instead of gitlab ci * docs: migrate documentation site Release-As: 0.8.0
- Loading branch information
Showing
41 changed files
with
1,098 additions
and
1,289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
# insert_final_newline = true | ||
max_line_length = 80 | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = false | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 0 | ||
|
||
[{Makefile, makefile, GNUmakefile, Makefile.*}] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.sh] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{ps1,psm1,psd1}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# Black/Ruff has its own set of formatting rules and defaults, which will re-format the code after .editorconfig is applied | ||
[*.py] | ||
indent_size = 4 | ||
max_line_length = 88 | ||
|
||
[*.{tf,tfvars,hcl}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: "setup-env" | ||
description: "Composite action to setup the Python and poetry environment, and install Pandoc." | ||
|
||
inputs: | ||
python-version: | ||
required: false | ||
description: "The python version to use" | ||
default: "3.12" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-in-project: true | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction | ||
shell: bash | ||
|
||
- name: Load cached Pandoc | ||
id: cached-pandoc | ||
uses: actions/cache@v4 | ||
with: | ||
path: /usr/local/bin/pandoc | ||
key: pandoc-${{ runner.os }}-${{ hashFiles('.tool-versions') }} | ||
|
||
- name: Install Pandoc | ||
if: steps.cached-pandoc.outputs.cache-hit != 'true' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y pandoc | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
quality-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up the environment | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Run checks | ||
run: make check | ||
|
||
tox: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
fail-fast: false | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Load cached venv | ||
uses: actions/cache@v4 | ||
with: | ||
path: .tox | ||
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up the environment | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Build documentation | ||
run: make docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: release-please | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.TM_INFRA_ROBOT_APP_ID }} | ||
private-key: ${{ secrets.TM_INFRA_ROBOT_PRIVATE_KEY }} | ||
- uses: googleapis/release-please-action@v4 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
release-type: python |
Oops, something went wrong.