feat: make timeout configurable; default to 3s #6
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: verify | |
on: | |
workflow_dispatch: | |
push: | |
# job ideas taken from here: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff | |
- name: Lint with Ruff | |
run: ruff --output-format=github . | |
continue-on-error: false | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests | |
run: python -m unittest | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: python -m build | |
slackNotificaton: | |
if: failure() | |
needs: [lint, test, build] | |
uses: ./.github/workflows/slack-notification.yaml | |
with: | |
channel: '#dada-prime' | |
job_status: 'failure' | |
secrets: inherit | |