File tree 6 files changed +389
-30
lines changed
6 files changed +389
-30
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ branches : [main]
8
+
9
+ jobs :
10
+ main :
11
+ name : Test and release
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ with :
17
+ fetch-depth : 0
18
+ - name : Set up Python 3.9
19
+ uses : actions/setup-python@v2
20
+ with :
21
+ python-version : 3.9
22
+ - name : Install Poetry
23
+
24
+ with :
25
+ virtualenvs-in-project : true
26
+ - name : Setup cache
27
+ id : cached-poetry-dependencies
28
+ uses : actions/cache@v2
29
+ with :
30
+ path : .venv
31
+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
32
+ - name : Install dependencies
33
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
34
+ run : poetry install
35
+ - name : Run tests
36
+ run : poetry run pytest -v --benchmark-enable
37
+ - name : Check formatting
38
+ run : poetry run black --check nbtlib tests examples
39
+ - name : Release
40
+ if : |
41
+ github.repository == 'vberlier/nbtlib'
42
+ && github.event_name == 'push'
43
+ && github.ref == 'refs/heads/main'
44
+ env :
45
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
47
+ run : |
48
+ git config --global user.name "github-actions"
49
+ git config --global user.email "[email protected] "
50
+ poetry run semantic-release publish -v DEBUG -D commit_author="github-actions <[email protected] >"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# nbtlib
2
2
3
- [ ![ Build Status ] ( https://travis-ci .com/vberlier/nbtlib.svg?branch=master )] ( https://travis-ci .com/vberlier/nbtlib )
3
+ [ ![ GitHub Actions ] ( https://github .com/vberlier/nbtlib/workflows/CI/badge .svg )] ( https://github .com/vberlier/nbtlib/actions )
4
4
[ ![ PyPI] ( https://img.shields.io/pypi/v/nbtlib.svg )] ( https://pypi.org/project/nbtlib/ )
5
5
[ ![ PyPI - Python Version] ( https://img.shields.io/pypi/pyversions/nbtlib.svg )] ( https://pypi.org/project/nbtlib/ )
6
6
You can’t perform that action at this time.
0 commit comments