Skip to content

Commit

Permalink
chore: updating release workflows + cleaning up deploy pipeline + doc…
Browse files Browse the repository at this point in the history
…kerfile updates
  • Loading branch information
stvnksslr committed Aug 18, 2024
1 parent 5731fd8 commit 7ec93f1
Show file tree
Hide file tree
Showing 14 changed files with 871 additions and 1,130 deletions.
38 changes: 0 additions & 38 deletions .codeclimate.yml

This file was deleted.

192 changes: 13 additions & 179 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,180 +1,14 @@
# Created by .ignore support plugin (hsz.mobi)
### Linux template
*~

.ruff_cache

.vscode/
.idea/
.mypy_cache
.idea
*.iml
.python-version
.env
.venv

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
__pycache__/
*.iml
.vscode/
.idea/
# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Windows template
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
.pytest_cache
.coverage
*/**/__pycache__

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests
### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
### SublimeText template
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# Workspace files are user-specific
*.sublime-workspace

# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project

# SFTP configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.github
.git
docker-compose.yml
dockerfile
README.md
setup.cfg
dsb.sqlite3

**/*.pytest_cache
**/*__pycache__
.mypy_cache
.ruff_cache
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# file: .github/workflows/build.yaml
name: build
name: Build

on:
pull_request:
Expand All @@ -14,7 +14,7 @@ on:
env:
PYTHON_VERSION: "3.12"
POETRY_VERSION: "1.8.3"

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -25,14 +25,14 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1.3.4
uses: snok/install-poetry@v1.4.1
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
Expand All @@ -42,7 +42,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -63,6 +63,11 @@ jobs:
- name: Run linters
run: poetry run ruff check .
#----------------------------------------------
# run type check
#----------------------------------------------
- name: Run type check
run: poetry run mypy src
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
name: Deploy

on:
push:
tags:
- "*.*"
workflow_run:
workflows: ["Build"]
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo
# check-out repo
#----------------------------------------------
- name: Checkout
uses: actions/checkout@v4
#----------------------------------------------
# fetch github metadata
# fetch github metadata
#----------------------------------------------
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{github.repository}}
tags: |
type=raw,value={{sha}}-{{date 'YYYYMMDDhhmmss'}}
#----------------------------------------------
# setup extra builder
#----------------------------------------------
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
#----------------------------------------------
# Login to github container registry
#----------------------------------------------
#----------------------------------------------
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -39,11 +43,11 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
#----------------------------------------------
# Push to registry
#----------------------------------------------
#----------------------------------------------
- name: Publish to Registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }},
labels: ${{ steps.meta.outputs.labels }}
Loading

0 comments on commit 7ec93f1

Please sign in to comment.