Merge pull request #3 from san-soucie/dependabot/github_actions/actio… #7
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
# Build, test, and run static analyses, and send reports to external services | |
# Runs only on pushing to main | |
name: maintest | |
on: | |
push: | |
branches: [main, master] | |
jobs: | |
build: | |
strategy: | |
max-parallel: 1 | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: ["3.9"] | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: read action options | |
id: read_options | |
run: | | |
json=`cat .github/action-options.json` | |
USE_SLACK=`echo $(jq -r '.use_slack' <<< "$json")` | |
- name: "Set up Python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Install build meta-dependencies | |
run: | | |
pip install poetry tox | |
- name: Test with tox | |
run: | | |
tox -v | |
- name: Update coveralls | |
run: | | |
pip install 'coveralls>=3,<4' | |
coveralls --service=github || true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update codecov | |
run: | | |
pip install 'codecov>=2.1,<3.0' | |
codecov || true | |
- name: Send Slack notification | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,action,workflow | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
if: always() && steps.read_options.outputs.USE_SLACK=='true' |