Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit ef18d53

Browse files
authored
github workflows (#103)
1 parent 2b93b4a commit ef18d53

34 files changed

Lines changed: 366 additions & 77 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Bug report
3+
about: Report a bug to help improve this project
4+
---
5+
6+
### Checklist
7+
8+
<!-- Please make sure you check all these items before submitting your bug report. -->
9+
10+
- [ ] The bug is reproducible against the latest release and/or `master`.
11+
- [ ] There are no similar issues or pull requests to fix it yet.
12+
13+
### Describe the bug
14+
15+
<!-- A clear and concise description of what the bug is. -->
16+
17+
### To reproduce
18+
19+
<!-- Provide a *minimal* example with steps to reproduce the bug locally.
20+
21+
NOTE: try to keep any external dependencies *at an absolute minimum*
22+
(middleware, servers, proxies, certificates...).
23+
In other words, remove anything that doesn't make the bug go away.
24+
-->
25+
26+
### Expected behavior
27+
28+
<!-- A clear and concise description of what you expected to happen. -->
29+
30+
### Actual behavior
31+
32+
<!-- A clear and concise description of what actually happens. -->
33+
34+
### Debugging material
35+
36+
<!-- Any tracebacks, screenshots, etc. that can help understanding the problem.
37+
38+
NOTE:
39+
- Please list tracebacks in full (don't truncate them).
40+
- Consider using `<details>` to make tracebacks/logs collapsible if they're very large (see https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d).
41+
-->
42+
43+
### Environment
44+
45+
- OS: <!-- eg Linux/Windows/macOS. -->
46+
- Python version: <!-- eg 3.8.5 (get it with `$ python -V`). -->
47+
- Typesystem version: <!-- eg 0.13.8 (get it with `$ pip show typesystem`). -->
48+
49+
### Additional context
50+
51+
<!-- Any additional information that can help understanding the problem.
52+
53+
Eg. linked issues, or a description of what you were trying to achieve. -->
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project.
4+
---
5+
6+
### Checklist
7+
8+
<!-- Please make sure you check all these items before submitting your feature request. -->
9+
10+
- [ ] There are no similar issues or pull requests for this yet.
11+
- [ ] I discussed this idea on the [community chat](https://gitter.im/encode/community) and feedback is positive.
12+
13+
### Is your feature related to a problem? Please describe.
14+
15+
<!-- A clear and concise description of what you are trying to achieve.
16+
17+
Eg "I want to be able to [...] but I can't because [...]". -->
18+
19+
## Describe the solution you would like.
20+
21+
<!-- A clear and concise description of what you would want to happen.
22+
23+
For API changes, try to provide a code snippet of what you would like the API to look like.
24+
-->
25+
26+
## Describe alternatives you considered
27+
28+
<!-- Please describe any alternative solutions or features you've considered to solve
29+
your problem and why they wouldn't solve it. -->
30+
31+
## Additional context
32+
33+
<!-- Provide any additional context, screenshots, tracebacks, etc. about the feature here. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2+
blank_issues_enabled: true
3+
contact_links:
4+
- name: Question
5+
url: https://gitter.im/encode/community
6+
about: >
7+
Ask a question

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Publish
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
publish:
11+
name: "Publish release"
12+
runs-on: "ubuntu-latest"
13+
14+
steps:
15+
- uses: "actions/checkout@v2"
16+
- uses: "actions/setup-python@v2"
17+
with:
18+
python-version: 3.7
19+
- name: "Install dependencies"
20+
run: "scripts/install"
21+
- name: "Build package & docs"
22+
run: "scripts/build"
23+
- name: "Publish to PyPI & deploy docs"
24+
run: "scripts/publish"
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test-suite.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Test Suite
3+
4+
on:
5+
push:
6+
branches: ["master"]
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
tests:
12+
name: "Python ${{ matrix.python-version }}"
13+
runs-on: "ubuntu-latest"
14+
15+
strategy:
16+
matrix:
17+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-rc.1"]
18+
19+
steps:
20+
- uses: "actions/checkout@v2"
21+
- uses: "actions/setup-python@v2"
22+
with:
23+
python-version: "${{ matrix.python-version }}"
24+
- name: "Install dependencies"
25+
run: "scripts/install"
26+
- name: "Run linting checks"
27+
run: "scripts/check"
28+
- name: "Build package & docs"
29+
run: "scripts/build"
30+
- name: "Run tests"
31+
run: "scripts/test"
32+
- name: "Enforce coverage"
33+
run: "scripts/coverage"

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# TypeSystem
22

33
<p>
4-
<a href="https://travis-ci.org/encode/typesystem">
5-
<img src="https://travis-ci.org/encode/typesystem.svg?branch=master" alt="Build Status">
4+
<a href="https://github.com/encode/typesystem/actions">
5+
<img src="https://github.com/encode/typesystem/workflows/Test%20Suite/badge.svg" alt="Build Status">
66
</a>
77
<a href="https://codecov.io/gh/encode/typesystem">
88
<img src="https://codecov.io/gh/encode/typesystem/branch/master/graph/badge.svg" alt="Coverage">

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
jinja2
33
pyyaml
44

5+
# Packaging
6+
twine
7+
wheel
8+
59
# Testing
610
autoflake
711
black
812
codecov
13+
flake8
914
isort
1015
mypy
1116
pytest
1217
pytest-cov
18+
types-PyYAML
1319

1420
# Documentation
1521
mkdocs

scripts/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Development Scripts
2+
3+
* `scripts/build` - Build package and documentation.
4+
* `scripts/check` - Check linting/formatting.
5+
* `scripts/clean` - Delete any build artifacts.
6+
* `scripts/coverage` - Check code coverage.
7+
* `scripts/install` - Install dependencies in a virtual environment.
8+
* `scripts/lint` - Run the code linting.
9+
* `scripts/publish` - Publish the latest version to PyPI.
10+
* `scripts/test` - Run the test suite.
11+
12+
Styled after GitHub's ["Scripts to Rule Them All"](https://github.com/github/scripts-to-rule-them-all).

scripts/build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh -e
2+
3+
if [ -d 'venv' ] ; then
4+
PREFIX="venv/bin/"
5+
else
6+
PREFIX=""
7+
fi
8+
9+
set -x
10+
11+
${PREFIX}python setup.py sdist bdist_wheel
12+
${PREFIX}twine check dist/*
13+
${PREFIX}mkdocs build

0 commit comments

Comments
 (0)