Skip to content

Commit

Permalink
Build/test refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 14, 2023
1 parent e022071 commit 8b09ef6
Show file tree
Hide file tree
Showing 11 changed files with 218 additions and 229 deletions.
Empty file added .config/requirements.txt
Empty file.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
version: 2
updates:
- package-ecosystem: pip
directory: /.config/
schedule:
day: sunday
interval: weekly
labels:
- dependabot-deps-updates
- skip-changelog
versioning-strategy: lockfile-only
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
labels:
- "dependencies"
- "skip-changelog"
54 changes: 3 additions & 51 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,3 @@
# Format and labels used aim to match those used by Ansible project
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: 'Major Changes'
labels:
- 'major' # c6476b
- title: 'Minor Changes'
labels:
- 'feature' # 006b75
- 'enhancement' # ededed
- 'refactoring'
- title: 'Bugfixes'
labels:
- 'bug' # fbca04
- title: 'Deprecations'
labels:
- 'deprecated' # fef2c0
exclude-labels:
- 'skip-changelog'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
- 'feature'
- 'enhancement'
- 'refactoring'
patch:
labels:
- 'patch'
- 'bug'
- 'deprecated'
default: patch
autolabeler:
- label: 'skip-changelog'
title: '/chore/i'
- label: 'bug'
title: '/fix/i'
- label: 'enhancement'
title: '/(enhance|improve)/i'
- label: 'feature'
title: '/feature/i'
- label: 'dreprecated'
title: '/deprecat/i'
template: |
$CHANGES
Kudos goes to: $CONTRIBUTORS
---
# see https://github.com/ansible/devtools
_extends: ansible/devtools
10 changes: 10 additions & 0 deletions .github/workflows/ack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# See https://github.com/ansible/devtools/blob/main/.github/workflows/ack.yml
name: ack
on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
ack:
uses: ansible/devtools/.github/workflows/ack.yml@main
21 changes: 0 additions & 21 deletions .github/workflows/labels.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# See https://github.com/ansible/devtools/blob/main/.github/workflows/push.yml
name: push
on:
push:
branches:
- main
- "releases/**"
- "stable/**"

jobs:
ack:
uses: ansible/devtools/.github/workflows/push.yml@main
18 changes: 0 additions & 18 deletions .github/workflows/release-drafter.yml

This file was deleted.

63 changes: 21 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: release

on:
Expand All @@ -8,51 +9,29 @@ jobs:
pypi:
name: Publish to PyPI registry
environment: release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
FORCE_COLOR: 1
PY_COLORS: 1
TOXENV: packaging
TOX_PARALLEL_NO_SPINNER: 1
TOXENV: pkg

steps:
- name: Switch to using Python 3.8 by default
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install non-PyPI dependencies (Linux only)
if: runner.os == 'Linux'
run: |
set -x
sudo apt-get update
sudo apt-get install --yes --no-install-recommends -V \
docbook-xml \
docbook-xsl \
libxml2-utils \
xsltproc
- name: Install tox
run: >-
python3 -m
pip install
--user
tox
- name: Check out src from Git
uses: actions/checkout@v2
with:
fetch-depth: 0 # needed by setuptools-scm
- name: Build dists
run: python -m tox
- name: Publish to test.pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
- name: Switch to using Python 3.9 by default
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install tox
run: python3 -m pip install --user "tox>=4.0.0"
- name: Check out src from Git
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed by setuptools-scm
- name: Build dists
run: python -m tox
- name: Publish to pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
Loading

0 comments on commit 8b09ef6

Please sign in to comment.