Skip to content

Commit

Permalink
github actions (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas authored Dec 13, 2020
1 parent 8281a41 commit bbdfa0e
Show file tree
Hide file tree
Showing 6 changed files with 233 additions and 271 deletions.
131 changes: 0 additions & 131 deletions .circleci/config.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish

on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.4
- name: Upload to pypi
run: |
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi "$TEST_PYPI_TOKEN"
poetry config pypi-token.pypi "$PYPI_TOKEN"
poetry publish --dry-run
poetry publish --repository testpypi
poetry publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
TEST_PYPI_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches: [master]

pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.4
- uses: actions/cache@v2
with:
path: |
~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-dev
- name: Run test
run: |
./scripts/ci.sh
- run: poetry build
Loading

0 comments on commit bbdfa0e

Please sign in to comment.