Space efficient solution O(1) #269
Workflow file for this run
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: Python Checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install test dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r .github/lint-requirements.txt | |
- name: Lint with flake8 | |
run: | | |
echo "::add-matcher::.github/flake8_matcher.json" | |
flake8 --count --statistics --show-source --append-config=tox.ini . | |
autoformat: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install test dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install black==22.3.0 | |
- name: Autoformatter | |
run: | | |
black --diff --check . | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install test dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest pytest-randomly | |
- name: Test with pytest | |
run: | | |
pytest |