|
4 | 4 | name: Python package |
5 | 5 |
|
6 | 6 | on: |
7 | | - push: |
8 | | - branches: [ master ] |
9 | | - pull_request: |
10 | | - branches: [ master ] |
| 7 | + push: |
| 8 | + branches: [master] |
| 9 | + pull_request: |
| 10 | + branches: [master] |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - build: |
| 13 | + build: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + env: |
| 16 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + python-version: ["3.7", "3.8"] |
14 | 20 |
|
15 | | - runs-on: ubuntu-latest |
16 | | - strategy: |
17 | | - matrix: |
18 | | - python-version: ['3.7', '3.8'] |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + - uses: actions/setup-node@v2.1.2 |
| 24 | + - name: Setup npm and build runestone.js |
| 25 | + run: | |
| 26 | + npm install |
| 27 | + npm run build |
| 28 | + - name: Set up Python ${{ matrix.python-version }} |
| 29 | + uses: actions/setup-python@v2 |
| 30 | + with: |
| 31 | + python-version: ${{ matrix.python-version }} |
| 32 | + - name: Install dependencies |
| 33 | + run: | |
| 34 | + python -m pip install --upgrade pip |
| 35 | + python -m pip install flake8 pytest |
| 36 | + pip install . |
| 37 | + if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi |
| 38 | + - name: Test with pytest |
| 39 | + run: | |
| 40 | + pytest |
19 | 41 |
|
20 | | - steps: |
21 | | - - uses: actions/checkout@v2 |
22 | | - - uses: actions/setup-node@v2.1.2 |
23 | | - - name: Setup npm and build runestone.js |
24 | | - run: | |
25 | | - npm install |
26 | | - npm run build |
27 | | - - name: Set up Python ${{ matrix.python-version }} |
28 | | - uses: actions/setup-python@v2 |
29 | | - with: |
30 | | - python-version: ${{ matrix.python-version }} |
31 | | - - name: Install dependencies |
32 | | - run: | |
33 | | - python -m pip install --upgrade pip |
34 | | - python -m pip install flake8 pytest |
35 | | - pip install . |
36 | | - if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi |
37 | | - - name: Test with pytest |
38 | | - run: | |
39 | | - pytest |
| 42 | + - name: Update Slack |
| 43 | + - uses: act10ns/slack@v1 |
| 44 | + with: |
| 45 | + status: ${{ job.status }} |
| 46 | + channel: "#builds" |
| 47 | + if: always() |
0 commit comments