Skip to content

Commit

Permalink
init workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaindex committed Sep 23, 2021
1 parent f33e955 commit e4c0d69
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Image

on:
release:
types: [published]

jobs:
new-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: amaindex/asyncio-socks-server
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
tags: "latest,${{ github.event.release.tag_name }}"
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
release:
types: [published]


jobs:
new-release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Install library
run: poetry install --no-interaction

- name: Build
run: poetry build

- name: Publish
run: poetry publish
--username ${{ secrets.PYPI_USERNAME }}
--password ${{ secrets.PYPI_PASSWORD }}

31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on: [push, pull_request, workflow_dispatch]

jobs:
run-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Install library
run: poetry install --no-interaction

- name: Run tests
run: poetry run pytest

0 comments on commit e4c0d69

Please sign in to comment.