diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02ad2844d..f2408d92a 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.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 2f5a7c917..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