Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changelog #8

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/chore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Chore checks

on:
push:
branches-ignore: ["main"]
pull_request:
branches-ignore: ["main"]

jobs:
fixup-commits:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check absence of fixup commits
run: |
! git log --pretty=format:%s | grep 'fixup!'

check-changelog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check that the CHANGELOG has been modified in the current branch
run: |
git diff --name-only origin/main | grep CHANGELOG

lint-changelog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Check CHANGELOG max line length
run: |
test $(cat CHANGELOG.md | grep -Ev "^\[.*\]: https://github.com/MTES-MCT/qualicharge" | wc -L) -le 80
12 changes: 5 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ name: Docker Image CI

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: make build
- uses: actions/checkout@v4
- name: Build the Docker image
run: make build
77 changes: 38 additions & 39 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,29 @@ name: Python application

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read

jobs:

build-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Pipenv
run: pipx install pipenv
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- name: Install dependencies
run: |
cd src/api
pipenv install -de .
- uses: actions/checkout@v4
- name: Install Pipenv
run: pipx install pipenv
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- name: Install dependencies
run: |
cd src/api
pipenv install -de .

lint-api:
needs: build-api
Expand All @@ -37,20 +36,20 @@ jobs:
run:
working-directory: ./src/api
steps:
- uses: actions/checkout@v4
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- name: Lint with Black
run: pipenv run black qualicharge tests
- name: Lint with Ruff
run: pipenv run ruff check qualicharge tests
- name: Lint with MyPy
run: pipenv run mypy qualicharge tests
- uses: actions/checkout@v4
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- name: Lint with Black
run: pipenv run black qualicharge tests
- name: Lint with Ruff
run: pipenv run ruff check qualicharge tests
- name: Lint with MyPy
run: pipenv run mypy qualicharge tests

test-api:
needs: build-api
Expand All @@ -59,13 +58,13 @@ jobs:
run:
working-directory: ./src/api
steps:
- uses: actions/checkout@v4
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- name: Test with pytest
run: pipenv run pytest
- uses: actions/checkout@v4
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- name: Test with pytest
run: pipenv run pytest
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Implement base FastAPI app

[unreleased]: https://github.com/MTES-MCT/qualicharge/compare/dc6a9e2...HEAD