Skip to content

Commit

Permalink
Merge pull request #60 from PaperMtn/release/4.3.0
Browse files Browse the repository at this point in the history
Release/4.3.0
  • Loading branch information
PaperMtn authored Oct 27, 2024
2 parents ae1f78c + d29c65b commit 94929fb
Show file tree
Hide file tree
Showing 28 changed files with 2,030 additions and 581 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker_build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and Test Docker Image

on:
push:

env:
TEST_TAG: papermountain/slack-watchman:test

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v6
with:
load: true
tags: ${{ env.TEST_TAG }}

- name: Inspect
run: |
docker image inspect ${{ env.TEST_TAG }}
- name: Test
run: |
docker run --rm ${{ env.TEST_TAG }} --version
docker run --rm ${{ env.TEST_TAG }} --help
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Publish Docker Image

on:
push:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Python Package

on:
push:
branches: [ develop, feature/**, release/**, hotfix/** ]
pull_request:
branches: [ develop, feature/**, release/**, hotfix/** ]

jobs:
build-ubuntu:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Test setup & install
run: |
poetry build
python3 -m pip install dist/*.whl
- name: Test run
run: |
slack-watchman --version
slack-watchman --help
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Poetry Publish

on:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/python_run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Unit Test via Pytest

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Analysing the code with pylint
run: |
poetry run pylint $(git ls-files '*.py')
continue-on-error: true
- name: Test with pytest
run: |
poetry run coverage run -m pytest -v -s
- name: Generate Coverage Report
run: |
poetry run coverage report -m
43 changes: 0 additions & 43 deletions .github/workflows/pythonpackage.yml

This file was deleted.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [4.3.0] - 2024-10-27
### Changed
- Timestamps are now in UTC across all logging for consistency
- Refactor some commonly used functions into a utils module
- More general code cleanup and refactoring

### Fixed
- Fixed a few bugs with models for User, Workspace and Messages not picking up all values

### Added
- GitHub actions for Python tests and Docker build and run testing
- Implemented unit tests for models

## [4.2.0] - 2024-09-27
### Added
- Added enumeration of conversations with populated Canvases attached. These can contain sensitive information, and are worth reviewing.
Expand Down
19 changes: 0 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
# syntax=docker/dockerfile:1

#FROM python:3.12-slim-bullseye
#WORKDIR /opt/slack-watchman
#COPY . /opt/slack-watchman
#RUN pip install poetry
#ENV PYTHONPATH=/opt/slack-watchman \
# SLACK_WATCHMAN_TOKEN="" \
# SLACK_WATCHMAN_COOKIE="" \
# SLACK_WATCHMAN_URL=""
#RUN poetry config virtualenvs.create false && \
# poetry install --no-dev && \
# chmod -R 700 . && \
# poetry build && \
# pip install dist/*.whl
#STOPSIGNAL SIGINT
#WORKDIR /opt/slack-watchman
#ENTRYPOINT ["slack-watchman"]

# syntax=docker/dockerfile:1
FROM python:3.12-slim-bullseye AS builder
WORKDIR /opt/slack-watchman
Expand Down
Loading

0 comments on commit 94929fb

Please sign in to comment.