Skip to content

Commit

Permalink
test: updated workflows to setup bee test node & run tests on windwos…
Browse files Browse the repository at this point in the history
…, mac & linux
  • Loading branch information
Aviksaikat committed Jun 22, 2024
1 parent 260a939 commit 93c7947
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9"] #, "3.10", "3.11"] Don't need them. hatch env matrix will handle it
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -36,6 +36,27 @@ jobs:
- name: Lint and typecheck
run: |
hatch run lint:lint-check
- name: Install Docker CLI
run: |
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
brew install --cask docker
else
sudo apt-get update
sudo apt-get install -y docker-ce
fi
- name: Install bee-factory
run: |
npm install -g @ethersphere/bee-factory
- name: Run Bee Factory
run: |
bee-factory start --detach 1.15.0-rc2
- name: Run Tests
run: |
hatch run test:pytest
if [[ "${{ matrix.os }}" == "windows-latest" ]];
then
hatch run test:pyest --cache-clear
else
hatch run test:test_unit_only
fi
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ dependencies = [

[tool.hatch.envs.test.scripts]
test = "pytest"
test_unit_only = "pytest tests/unit/"
test-cov-xml = "pytest --cov-report=xml"


Expand Down

0 comments on commit 93c7947

Please sign in to comment.