Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Updating workflow #1

Merged
merged 4 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Config file for the labeler Github Action
# https://hub.docker.com/r/jimschubert/labeler-action
# labeler "full" schema

# enable labeler on issues, prs, or both.
enable:
issues: true
prs: true

# comments object allows you to specify a different message for issues and prs

# comments:
# issues: |
# Thanks for opening this issue!
# I have applied any labels matching special text in your title and description.

# Please review the labels and make any necessary changes.
# prs: |
# Thanks for the contribution!
# I have applied any labels matching special text in your title and description.

# Please review the labels and make any necessary changes.

# Labels is an object where:
# - keys are labels
# - values are objects of { include: [ pattern ], exclude: [ pattern ] }
# - pattern must be a valid regex, and is applied globally to
# title + description of issues and/or prs (see enabled config above)
# - 'include' patterns will associate a label if any of these patterns match
# - 'exclude' patterns will ignore this label if any of these patterns match
labels:
'Type: Fix':
include:
- '^(bug|fix)(\(.*\))?:(.*)'
exclude: []
'Type: Feature':
include:
- '^feat(\(.*\))?:(.*)'
exclude: []
'Type: Build':
include:
- '^build(\(.*\))?:(.*)'
exclude: []
'Type: Documentation':
include:
- '^docs(\(.*\))?:(.*)'
exclude: []
'Type: Refactoring':
include:
- '^(refactor|style)(\(.*\))?:(.*)'
exclude: []
'Type: Testing':
include:
- '^test(\(.*\))?:(.*)'
exclude: []
'Type: Maintenance':
include:
- '^(chore|mnt)(\(.*\))?:(.*)'
exclude: []
'Type: CI':
include:
- '^ci(\(.*\))?:(.*)'
exclude: []
'Type: Performance':
include:
- '^perf(\(.*\))?:(.*)'
exclude: []
'Type: Revert':
include:
- '^revert(\(.*\))?:(.*)'
exclude: []
'skip-changelog':
include:
- '^(chore: pre-commit autoupdate)'
exclude: []
37 changes: 37 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'Type: Feature'
- 'Type: Performance'
- title: '🐛 Bug Fixes'
labels:
- 'Type: Fix'
- title: '📚 Documentation'
label: 'Type: Documentation'
- title: '🧰 Maintenance'
label:
- 'Type: Maintenance'
- 'Type: Build'
- 'Type: Refactoring'
- 'Type: CI'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
exclude-labels:
- 'skip-changelog'
template: |
## Changes

$CHANGES
18 changes: 18 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Always validate the PR title, and ignore the commits
titleOnly: true

# By default types specified in commitizen/conventional-commit-types is used.
# See: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json
# You can override the valid types
types:
- feat
- fix
- docs
- style
- refactor
- perf
- test
- build
- ci
- chore
- revert
18 changes: 18 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Label PRs and issues
on:
issues:
types: [opened, edited, milestoned]
pull_request_target:
types: [opened]

jobs:

labeler:
runs-on: ubuntu-latest

steps:
- name: Check Labels
id: labeler
uses: jimschubert/labeler-action@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
125 changes: 0 additions & 125 deletions .github/workflows/python-app.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/run-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests, generate coverage
# report and upload it to codecov.
# For more information, see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run tests with coverage

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov codecov
pip install -r requirements.txt
- name: Install adapt
run: |
pip install -e .
- name: Test with pytest
run: |
pytest --cov=adapt
- name: Upload codecov
run: |
codecov
38 changes: 38 additions & 0 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- os: windows-latest
python-version: 3.9
runs-on: ${{ matrix.os }}
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: |
python -m pip install --upgrade pip
pip install pytest pytest-cov codecov
pip install -r requirements.txt
- name: Install adapt
run: |
pip install -e .
- name: Test with pytest
run: |
python -m pytest --no-cov
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Find the details of all implemented methods as well as illustrative examples her

## Installation

This package is available on [Pypi](https://pypi.org/project/adapt) and can be installed with the following command line:
This package is available on [Pypi](https://pypi.org/project/adapt) and can be installed with the following command line:

```
pip install adapt
Expand Down