Skip to content

Commit

Permalink
Merge pull request #2 from adamyodinsky/github-actions
Browse files Browse the repository at this point in the history
- Adding ci with github actions.
- Adding unit tests.
- Catching errors of rate limit and not crashing.
  • Loading branch information
adamyodinsky authored Mar 15, 2023
2 parents 5956cc9 + aad6577 commit 0b44733
Show file tree
Hide file tree
Showing 7 changed files with 696 additions and 475 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Continuous Integration
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
required: true
type: string
poetry-version:
description: 'Poetry version'
required: true
type: string
os:
description: 'OS'
required: true
type: string
jobs:
build:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ inputs.poetry-version }}
- name: install
run: poetry install
- name: build
run: poetry build
- name: test
run: |
filename=$(date +"%Y-%m-%d")"_test_result.xml"
poetry run pytest -v --junitxml=${filename}
# TODOLATER: publish test results
# - name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action@v2
# with:
# files: |
# test-results/**/*.xml

13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Continuous Integration
run-name: ${{ github.actor }} CI 🚀
on:
push:
branches:
- '*'
jobs:
ci:
uses: ./.github/workflows/ci.yml
with:
python-version: 3.9
poetry-version: 1.4.0
os: ubuntu-latest
Loading

0 comments on commit 0b44733

Please sign in to comment.