Skip to content

Commit

Permalink
Merge branch 'template'
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Nov 29, 2023
2 parents c6a18a7 + 4f8e195 commit 23ad362
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 32 deletions.
48 changes: 16 additions & 32 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,43 +95,27 @@ jobs:
container: ${{ matrix.image }}

steps:
- name: Install dependencies via apt
- name: Install prerequisites via apt
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -ex
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y git
- uses: actions/checkout@v4
- name: Install dependencies via apt
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -ex
deps=$(sed -n '/^\[tool.gha-check-distro\]/,/^\[/p' pyproject.toml \
| tr '\n' ' ' \
| grep -o -P '\sdependencies-apt\s*=\s*\K\[.*?\]' \
| grep -o -P '".*?"' \
| tr -d '"')
apt-cache --generate pkgnames \
| grep --line-regexp --fixed-strings \
-e git \
-e python3-bottle \
-e python3-build \
-e python3-click \
-e python3-click-option-group \
-e python3-configobj \
-e python3-cram \
-e python3-flake8 \
-e python3-importlib-metadata \
-e python3-isort \
-e python3-multidict \
-e python3-mypy \
-e python3-pep517 \
-e python3-pip \
-e python3-pip-whl \
-e python3-platformdirs \
-e python3-pytest \
-e python3-requests \
-e python3-requests-oauthlib \
-e python3-tabulate \
-e python3-typeshed \
-e python3-typing-extensions \
-e python3-ujson \
-e python3-vcr \
-e python3-venv \
-e python3-yaml \
-e python3-yarl \
-e twine \
| grep --line-regexp --fixed-strings "$deps" \
| xargs apt install -y
- uses: actions/checkout@v4
- name: Workaround for https://github.com/actions/checkout/pull/762 not persisting
run: git config --global --add safe.directory "$PWD"
- name: Install remaining dependencies
Expand Down
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,37 @@ test = [
[project.scripts]
strava-offline = "strava_offline.cli:cli"

[tool.gha-check-distro]
dependencies-apt = [
"python3-bottle",
"python3-build",
"python3-click",
"python3-click-option-group",
"python3-configobj",
"python3-cram",
"python3-flake8",
"python3-importlib-metadata",
"python3-isort",
"python3-multidict",
"python3-mypy",
"python3-pep517",
"python3-pip",
"python3-pip-whl",
"python3-platformdirs",
"python3-pytest",
"python3-requests",
"python3-requests-oauthlib",
"python3-tabulate",
"python3-typeshed",
"python3-typing-extensions",
"python3-ujson",
"python3-vcr",
"python3-venv",
"python3-yaml",
"python3-yarl",
"twine",
]

[tool.setuptools_scm]

[tool.setuptools.packages.find]
Expand Down

0 comments on commit 23ad362

Please sign in to comment.