Merge pull request #8 from mcataford/build/environment-updates
build: environment updates
This commit is contained in:
commit
add064e7c9
12 changed files with 87 additions and 94 deletions
18
.github/workflows/main.yml
vendored
18
.github/workflows/main.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python: [3.7, 3.8, 3.9]
|
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
|
@ -25,13 +25,13 @@ jobs:
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
if: steps.dep-cache.outputs.cache-hit != 'true'
|
if: steps.dep-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
. script/bootstrap
|
. script/bootstrap.sh
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: setup
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python: [3.7, 3.8, 3.9]
|
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
|
@ -45,7 +45,7 @@ jobs:
|
||||||
./slack-status-cli.venv
|
./slack-status-cli.venv
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: |
|
run: |
|
||||||
. script/bootstrap
|
. script/bootstrap.sh
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: |
|
run: |
|
||||||
python -m pytest --cov-report xml --cov=slack_status_cli -s
|
python -m pytest --cov-report xml --cov=slack_status_cli -s
|
||||||
|
@ -77,7 +77,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "3.12"
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: dep-cache
|
id: dep-cache
|
||||||
with:
|
with:
|
||||||
|
@ -86,7 +86,7 @@ jobs:
|
||||||
./slack-status-cli.venv
|
./slack-status-cli.venv
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: |
|
run: |
|
||||||
. script/bootstrap
|
. script/bootstrap.sh
|
||||||
- name: Lint and format
|
- name: Lint and format
|
||||||
run: |
|
run: |
|
||||||
python -m pylint **/*.py
|
python -m pylint **/*.py
|
||||||
|
@ -98,7 +98,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "3.12"
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: dep-cache
|
id: dep-cache
|
||||||
with:
|
with:
|
||||||
|
@ -107,8 +107,8 @@ jobs:
|
||||||
./slack-status-cli.venv
|
./slack-status-cli.venv
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: |
|
run: |
|
||||||
. script/bootstrap
|
. script/bootstrap.sh
|
||||||
- name: Lint and format
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
python -m build
|
python -m build
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
disable=consider-using-f-string,
|
disable=broad-except,
|
||||||
broad-except,
|
broad-exception-raised,
|
||||||
|
consider-using-f-string,
|
||||||
|
consider-using-with,
|
||||||
invalid-name,
|
invalid-name,
|
||||||
missing-module-docstring,
|
|
||||||
missing-function-docstring,
|
missing-function-docstring,
|
||||||
consider-using-with
|
missing-module-docstring,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
3.9.6
|
3.12
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
name = "slack-status-cli"
|
name = "slack-status-cli"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Tooling to set your Slack status on the fly without having to click around"
|
description = "Tooling to set your Slack status on the fly without having to click around"
|
||||||
requires-python = ">=3.7"
|
requires-python = ">=3.8"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
dependencies = []
|
||||||
|
|
||||||
[[project.authors]]
|
[[project.authors]]
|
||||||
name = "Marc Cataford"
|
name = "Marc Cataford"
|
||||||
email = "mcat@riseup.net"
|
email = "mcat@riseup.net"
|
||||||
|
@ -12,5 +14,16 @@ email = "mcat@riseup.net"
|
||||||
Homepage = "https://github.com/mcataford/slack-status-cli"
|
Homepage = "https://github.com/mcataford/slack-status-cli"
|
||||||
"Bug Tracker" = "https://github.com/mcataford/slack-status-cli/issues"
|
"Bug Tracker" = "https://github.com/mcataford/slack-status-cli/issues"
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
dev = [
|
||||||
|
"build",
|
||||||
|
"toml",
|
||||||
|
"pytest",
|
||||||
|
"black",
|
||||||
|
"pylint",
|
||||||
|
"pytest-cov",
|
||||||
|
"syrupy",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
packages = [ "slack_status_cli",]
|
packages = [ "slack_status_cli",]
|
||||||
|
|
|
@ -1,6 +1 @@
|
||||||
#
|
|
||||||
# This file is autogenerated by pip-compile with python 3.9
|
|
||||||
# To update, run:
|
|
||||||
#
|
|
||||||
# pip-compile ./requirements.in
|
|
||||||
#
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
-c requirements.txt
|
|
||||||
|
|
||||||
build
|
|
||||||
toml
|
|
||||||
pytest
|
|
||||||
black
|
|
||||||
pylint
|
|
||||||
pytest-cov
|
|
||||||
syrupy
|
|
|
@ -1,80 +1,50 @@
|
||||||
#
|
astroid==3.0.3
|
||||||
# This file is autogenerated by pip-compile with python 3.9
|
|
||||||
# To update, run:
|
|
||||||
#
|
|
||||||
# pip-compile ./requirements_dev.in
|
|
||||||
#
|
|
||||||
astroid==2.12.12
|
|
||||||
# via pylint
|
# via pylint
|
||||||
attrs==22.1.0
|
black==24.1.1
|
||||||
# via pytest
|
# via slack-status-cli (pyproject.toml)
|
||||||
black==22.10.0
|
build==1.0.3
|
||||||
# via -r ./requirements_dev.in
|
# via slack-status-cli (pyproject.toml)
|
||||||
build==0.9.0
|
click==8.1.7
|
||||||
# via -r ./requirements_dev.in
|
|
||||||
click==8.1.3
|
|
||||||
# via black
|
# via black
|
||||||
colored==1.4.3
|
coverage[toml]==7.4.1
|
||||||
# via syrupy
|
|
||||||
coverage[toml]==6.5.0
|
|
||||||
# via pytest-cov
|
# via pytest-cov
|
||||||
dill==0.3.6
|
dill==0.3.8
|
||||||
# via pylint
|
# via pylint
|
||||||
exceptiongroup==1.0.0
|
iniconfig==2.0.0
|
||||||
# via pytest
|
# via pytest
|
||||||
iniconfig==1.1.1
|
isort==5.13.2
|
||||||
# via pytest
|
|
||||||
isort==5.10.1
|
|
||||||
# via pylint
|
# via pylint
|
||||||
lazy-object-proxy==1.8.0
|
|
||||||
# via astroid
|
|
||||||
mccabe==0.7.0
|
mccabe==0.7.0
|
||||||
# via pylint
|
# via pylint
|
||||||
mypy-extensions==0.4.3
|
mypy-extensions==1.0.0
|
||||||
# via black
|
# via black
|
||||||
packaging==21.3
|
packaging==23.2
|
||||||
# via
|
# via
|
||||||
|
# black
|
||||||
# build
|
# build
|
||||||
# pytest
|
# pytest
|
||||||
pathspec==0.10.1
|
pathspec==0.12.1
|
||||||
# via black
|
# via black
|
||||||
pep517==0.13.0
|
platformdirs==4.2.0
|
||||||
# via build
|
|
||||||
platformdirs==2.5.2
|
|
||||||
# via
|
# via
|
||||||
# black
|
# black
|
||||||
# pylint
|
# pylint
|
||||||
pluggy==1.0.0
|
pluggy==1.4.0
|
||||||
# via pytest
|
# via pytest
|
||||||
pylint==2.15.5
|
pylint==3.0.3
|
||||||
# via -r ./requirements_dev.in
|
# via slack-status-cli (pyproject.toml)
|
||||||
pyparsing==3.0.9
|
pyproject-hooks==1.0.0
|
||||||
# via packaging
|
# via build
|
||||||
pytest==7.2.0
|
pytest==7.4.4
|
||||||
# via
|
# via
|
||||||
# -r ./requirements_dev.in
|
|
||||||
# pytest-cov
|
# pytest-cov
|
||||||
|
# slack-status-cli (pyproject.toml)
|
||||||
# syrupy
|
# syrupy
|
||||||
pytest-cov==4.0.0
|
pytest-cov==4.1.0
|
||||||
# via -r ./requirements_dev.in
|
# via slack-status-cli (pyproject.toml)
|
||||||
syrupy==3.0.2
|
syrupy==4.6.0
|
||||||
# via -r ./requirements_dev.in
|
# via slack-status-cli (pyproject.toml)
|
||||||
toml==0.10.2
|
toml==0.10.2
|
||||||
# via -r ./requirements_dev.in
|
# via slack-status-cli (pyproject.toml)
|
||||||
tomli==2.0.1
|
tomlkit==0.12.3
|
||||||
# via
|
|
||||||
# black
|
|
||||||
# build
|
|
||||||
# coverage
|
|
||||||
# pep517
|
|
||||||
# pylint
|
|
||||||
# pytest
|
|
||||||
tomlkit==0.11.6
|
|
||||||
# via pylint
|
# via pylint
|
||||||
typing-extensions==4.4.0
|
|
||||||
# via
|
|
||||||
# astroid
|
|
||||||
# black
|
|
||||||
# pylint
|
|
||||||
wrapt==1.14.1
|
|
||||||
# via astroid
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
PROJECT="slack-status-cli"
|
PROJECT="slack-status-cli"
|
||||||
|
|
||||||
python -m pip install pip==21.2.0 pip-tools==6.5.0 --no-cache
|
python -m pip install --upgrade setuptools
|
||||||
|
python -m pip install pip~=23.0 pip-tools~=7.3 --no-cache
|
||||||
|
|
||||||
if [ ! -d "./$PROJECT.venv" ]; then
|
if [ ! -d "./$PROJECT.venv" ]; then
|
||||||
python -m venv ./$PROJECT.venv
|
python -m venv ./$PROJECT.venv
|
||||||
|
@ -10,4 +11,4 @@ fi
|
||||||
|
|
||||||
source ./$PROJECT.venv/bin/activate
|
source ./$PROJECT.venv/bin/activate
|
||||||
|
|
||||||
pip-sync ./requirements_dev.txt
|
pip-sync ./requirements.txt ./requirements_dev.txt
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
pip-compile ./requirements.in
|
|
||||||
pip-compile ./requirements_dev.in
|
|
25
script/lock.sh
Normal file
25
script/lock.sh
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PROD_DEP="requirements.txt"
|
||||||
|
DEV_DEP="requirements_dev.txt"
|
||||||
|
|
||||||
|
echo "Locking production dependencies as $PROD_DEP"
|
||||||
|
|
||||||
|
python -m piptools compile \
|
||||||
|
-o $PROD_DEP \
|
||||||
|
--no-header \
|
||||||
|
pyproject.toml
|
||||||
|
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
echo "Failed to lock production dependencies."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Locking production dependencies as $DEV_DEP"
|
||||||
|
|
||||||
|
python -m piptools compile \
|
||||||
|
-o $DEV_DEP \
|
||||||
|
--no-header \
|
||||||
|
--extra dev \
|
||||||
|
--constraint $PROD_DEP \
|
||||||
|
pyproject.toml
|
|
@ -1,3 +1,4 @@
|
||||||
|
# serializer version: 1
|
||||||
# name: test_sends_request_to_slack_api_on_success
|
# name: test_sends_request_to_slack_api_on_success
|
||||||
dict({
|
dict({
|
||||||
'profile': list([
|
'profile': list([
|
||||||
|
|
Loading…
Reference in a new issue