From e99230b0cba35f28c69e9cc6c2b1b333c7c5e3b8 Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Thu, 9 Mar 2023 18:05:28 +0100 Subject: [PATCH 1/3] Add .github/workflows/bitfinex-api-py-ci.yml workflow for Github Actions. --- .github/workflows/bitfinex-api-py-ci.yml | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/bitfinex-api-py-ci.yml diff --git a/.github/workflows/bitfinex-api-py-ci.yml b/.github/workflows/bitfinex-api-py-ci.yml new file mode 100644 index 0000000..96146d5 --- /dev/null +++ b/.github/workflows/bitfinex-api-py-ci.yml @@ -0,0 +1,31 @@ +name: bitfinex-api-py-ci + +on: + push: + branches: + - feature/ci-cd + pull_request: + branches: + - feature/ci-cd + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.8 + - uses: actions/setup-python@v4 + with: + python-version: '3.8' + - name: Install bitfinex-api-py's dependencies + - run: python -m pip install -r dev-requirements.txt + - name: Lint the project with pylint (and fail if score is lower than 10.00/10.00) + - run: python -m pylint bfxapi + - name: Run mypy to check the correctness of type hinting (and fail if any error or warning is found) + - run: python -m mypy bfxapi + - name: Execute project's unit tests (unittest) + - run: python -m unittest bfxapi.tests From 87bc19da483c3d9dc0288ee34cd2100225455537 Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Thu, 9 Mar 2023 18:06:04 +0100 Subject: [PATCH 2/3] Add .travis.yml for Travis-CI support. --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c9210f6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: + - "3.8.0" +before_install: + - python -m pip install --upgrade pip +install: + - pip install -r dev-requirements.txt +script: + - python -m pylint bfxapi + - python -m mypy bfxapi + - python -m unittest bfxapi.tests From e8c7374cf25b943ad4ed880ece7abd184b6405ba Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Thu, 9 Mar 2023 18:06:46 +0100 Subject: [PATCH 3/3] Fix bug in .github/workflows/bitfinex-api-py-ci.yml. --- .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/workflows/bitfinex-api-py-ci.yml | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a6d5024..f08ca31 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,6 +11,7 @@ PR fixes the following issue: ## Type of change + - [ ] Bug fix (non-breaking change which fixes an issue); - [ ] New feature (non-breaking change which adds functionality); diff --git a/.github/workflows/bitfinex-api-py-ci.yml b/.github/workflows/bitfinex-api-py-ci.yml index 96146d5..4728359 100644 --- a/.github/workflows/bitfinex-api-py-ci.yml +++ b/.github/workflows/bitfinex-api-py-ci.yml @@ -18,14 +18,14 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python 3.8 - - uses: actions/setup-python@v4 + uses: actions/setup-python@v4 with: python-version: '3.8' - name: Install bitfinex-api-py's dependencies - - run: python -m pip install -r dev-requirements.txt + run: python -m pip install -r dev-requirements.txt - name: Lint the project with pylint (and fail if score is lower than 10.00/10.00) - - run: python -m pylint bfxapi + run: python -m pylint bfxapi - name: Run mypy to check the correctness of type hinting (and fail if any error or warning is found) - - run: python -m mypy bfxapi + run: python -m mypy bfxapi - name: Execute project's unit tests (unittest) - - run: python -m unittest bfxapi.tests + run: python -m unittest bfxapi.tests