-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (43 loc) · 1.37 KB
/
main.yml
File metadata and controls
45 lines (43 loc) · 1.37 KB
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
name: Tests
on: [push, pull_request]
jobs:
unittest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13']
steps:
- name: Checkout PyAutoConf
uses: actions/checkout@v2
with:
path: PyAutoConf
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install wheel
pip3 install numpy
pip3 install pytest==6.2.5 coverage pytest-cov
pip install "./PyAutoConf[optional]"
- name: Run tests
run: |
pushd PyAutoConf
python3 -m pytest --cov autoconf --cov-report xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Slack send
if: ${{ failure() }}
id: slack
uses: slackapi/slack-github-action@v1.21.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
channel-id: C03S98FEDK2
payload: |
{
"text": "${{ github.repository }}/${{ github.ref_name }} (Python ${{ matrix.python-version }}) build result: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}