Update and modify files for the project #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: ["push", "pull_request"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linting: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install PDM | |
run: | | |
python -m pip install --upgrade pdm | |
- name: Install Dependencies | |
run: | | |
pdm install --dev | |
- name: Run Black | |
run: pdm run black --check . | |
- name: Run isort | |
run: pdm run isort --check-only . | |
- name: Run flake8 | |
run: pdm run flake8 . | |
- name: Run Ruff | |
run: | | |
pdm run ruff . | |
type-check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install PDM | |
run: | | |
python -m pip install --upgrade pdm | |
- name: Install Dependencies | |
run: | | |
pdm install --dev | |
- name: Run MyPy | |
run: pdm run mypy -p bee_py | |
functional: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install PDM | |
run: | | |
python -m pip install --upgrade pdm | |
- name: Install Dependencies | |
run: | | |
pdm install --dev | |
# - name: Install Docker | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y docker-ce | |
- name: Install Docker CLI | |
run: | | |
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then | |
brew install --cask docker | |
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
choco install docker-cli -y | |
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: pdm run pytest | |
fuzzing: | |
runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install PDM | |
run: | | |
python -m pip install --upgrade pdm | |
- name: Install Dependencies | |
run: | | |
pdm install --dev | |
- name: Install Docker | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
- 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: pdm run pytest |