Skip to content

Commit 48d78ed

Browse files
Run CLI tests in CI
1 parent de26adf commit 48d78ed

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,44 @@ jobs:
7373
- name: Run integration tests
7474
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
7575
run: nox -vs integration
76+
cli-test:
77+
needs: lint
78+
env:
79+
B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }}
80+
B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
81+
INSTALL_SDK_FROM: ../b2-sdk-python
82+
runs-on: ${{ matrix.os }}
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
os: [ ubuntu-latest, macos-latest, windows-latest ]
87+
python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, pypy3 ]
88+
exclude:
89+
- os: windows-latest
90+
python-version: pypy3
91+
steps:
92+
- uses: actions/checkout@v2
93+
with:
94+
fetch-depth: 0
95+
path: b2-sdk-python
96+
- uses: actions/checkout@v2
97+
with:
98+
fetch-depth: 0
99+
repository: Backblaze/B2_Command_Line_Tool
100+
path: B2_Command_Line_Tool
101+
- name: Set up Python ${{ matrix.python-version }}
102+
uses: actions/setup-python@v2
103+
with:
104+
python-version: ${{ matrix.python-version }}
105+
- name: Install dependencies
106+
run: python -m pip install --upgrade nox pip setuptools
107+
- name: Run unit tests
108+
run: nox -vs unit
109+
working-directory: B2_Command_Line_Tool
110+
- name: Run integration tests
111+
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
112+
run: nox -vs integration -- --cleanup
113+
working-directory: B2_Command_Line_Tool
76114
doc:
77115
needs: build
78116
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
* Add `get_bucket_name_or_none_from_bucket_id` to `AccountInfo` and `Cache`
2525
* Add possibility to change realm during integration tests
2626
* Add support for "file locks": file retention, legal hold and default bucket retention
27+
* Add running CLI unit and integration tests in CI
2728

2829
### Fixed
2930
* Cleanup sync errors related to directories

0 commit comments

Comments
 (0)