Skip to content

Commit

Permalink
3.0 Refactor
Browse files Browse the repository at this point in the history
#major
  • Loading branch information
pbrissaud authored Dec 28, 2021
1 parent edc9870 commit d1f8d0b
Show file tree
Hide file tree
Showing 47 changed files with 2,094 additions and 1,799 deletions.
7 changes: 0 additions & 7 deletions .env

This file was deleted.

3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Installation mode:** (choose one)
- [ ] Full-stack
- [ ] Standalone
- [ ] Docker
- [ ] Docker-Compose

**Environnement:**
Please provide any useful information of your environnement (os, software version, etc ...)
Expand Down
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

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

- package-ecosystem: "docker"
directory: "/app"
schedule:
interval: "weekly"
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

92 changes: 92 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: "Acceptance tests"

on:
pull_request:
branches: [ master ]

jobs:
python-linter:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: ricardochaves/[email protected]
with:
python-root-list: "app/src/"
use-pycodestyle: false
use-pylint: false
use-black: false
use-mypy: false
use-isort: false
extra-flake8-options: "--ignore=E501"

codeql:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
paulbrissaud/suivi-bourse-app
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=pr
- name: Build
uses: docker/build-push-action@v2
with:
context: ./app
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Releasing process
on:
push:
branches:
- master
jobs:
new_version:
runs-on: ubuntu-latest
outputs:
new_version: ${{ steps.bump_version.outputs.version }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"

- uses: actions/setup-python@v2
with:
python-version: "3.x"

- uses: BSFishy/pip-action@v1
with:
packages: |
PyYAML
semver
PyGithub
mdutils
- id: bump_version
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_BRANCH: "master"
run: |
output=$(python3 utils/bumping.py)
echo "::set-output name=version::$output"
docker:
needs: new_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
paulbrissaud/test
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}},value=${{needs.new_version.outputs.new_version}}
type=semver,pattern={{major}}.{{minor}},value=${{needs.new_version.outputs.new_version}}
type=semver,pattern={{major}},value=${{needs.new_version.outputs.new_version}}
type=sha,prefix=
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./app
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading

0 comments on commit d1f8d0b

Please sign in to comment.