-
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (60 loc) · 1.78 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
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
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch pre-commit
hatch env create
- 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
echo "Not going to bother with integration tests for macOS"
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
echo "Not going to bother with integration tests for windows as well"
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: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]];
then
npm install -g @ethersphere/bee-factory
bee-factory start --detach 1.15.0-rc2
hatch run test:pytest --cache-clear
else
hatch run test:test_unit_only
fi