From 48d78ed96c91a12de38dcf4e381094213224c461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Fri, 4 Jun 2021 13:25:26 +0200 Subject: [PATCH 1/3] Run CLI tests in CI --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 39 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02ad2844d..f59f42ff3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,44 @@ jobs: - name: Run integration tests if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} run: nox -vs integration + cli-test: + needs: lint + env: + B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} + B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} + INSTALL_SDK_FROM: ../b2-sdk-python + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, pypy3 ] + exclude: + - os: windows-latest + python-version: pypy3 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + path: b2-sdk-python + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + repository: Backblaze/B2_Command_Line_Tool + path: B2_Command_Line_Tool + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: python -m pip install --upgrade nox pip setuptools + - name: Run unit tests + run: nox -vs unit + working-directory: B2_Command_Line_Tool + - name: Run integration tests + if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} + run: nox -vs integration -- --cleanup + working-directory: B2_Command_Line_Tool doc: needs: build runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 84fa0a88e..603a92a21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add `get_bucket_name_or_none_from_bucket_id` to `AccountInfo` and `Cache` * Add possibility to change realm during integration tests * Add support for "file locks": file retention, legal hold and default bucket retention +* Add running CLI unit and integration tests in CI ### Fixed * Cleanup sync errors related to directories From 43850d2f4d43f4652cb16f65057b7d1ee0e4f1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= <77497496+mpnowacki-reef@users.noreply.github.com> Date: Mon, 7 Jun 2021 21:13:40 +0200 Subject: [PATCH 2/3] Less python versions tested for CLI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f59f42ff3..f2408d92a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, pypy3 ] + python-version: [ 3.5, 3.9, pypy3 ] exclude: - os: windows-latest python-version: pypy3 From 096af9988719720f666028d198bb29d464de48b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Tue, 8 Jun 2021 10:35:49 +0200 Subject: [PATCH 3/3] changelog update --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98fc37d8d..ded17b7db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +* Add running CLI unit and integration tests in CI + ## [1.9.0] - 2021-06-07 ### Added @@ -31,7 +34,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add `get_bucket_name_or_none_from_bucket_id` to `AccountInfo` and `Cache` * Add possibility to change realm during integration tests * Add support for "file locks": file retention, legal hold and default bucket retention -* Add running CLI unit and integration tests in CI ### Fixed * Cleanup sync errors related to directories