jvroo commited on
Commit
d58f7e0
·
1 Parent(s): 599d3e4

Update github actions

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +20 -11
.github/workflows/main.yml CHANGED
@@ -8,26 +8,34 @@ on:
8
  workflow_dispatch:
9
 
10
  jobs:
11
- sync-to-hub:
12
- runs-on: ubuntu-latest
 
 
 
 
13
 
14
  steps:
15
- - name: Checkout code
16
- uses: actions/checkout@v3
17
 
18
- - name: Set up Python
19
- uses: actions/setup-python@v4
20
  with:
21
- python-version: '3.8'
22
 
23
  - name: Install dependencies
24
  run: |
25
- pip install -r requirements.txt
26
- pip install pytest
 
 
 
27
 
28
- - name: Run tests
29
- run: pytest
 
30
 
 
31
  - name: Checkout for Hugging Face push
32
  uses: actions/checkout@v2
33
  with:
@@ -45,6 +53,7 @@ jobs:
45
 
46
  notify:
47
  runs-on: ubuntu-latest
 
48
 
49
  steps:
50
  - name: Send Discord notification
 
8
  workflow_dispatch:
9
 
10
  jobs:
11
+ test:
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ matrix:
15
+ os: [ubuntu-latest, windows-latest]
16
+ python-version: ['3.6', '3.7', '3.8', '3.9']
17
 
18
  steps:
19
+ - uses: actions/checkout@v2
 
20
 
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v2
23
  with:
24
+ python-version: ${{ matrix.python-version }}
25
 
26
  - name: Install dependencies
27
  run: |
28
+ python -m pip install --upgrade pip
29
+ pip install tox tox-gh-actions
30
+
31
+ - name: Test with tox
32
+ run: tox
33
 
34
+ sync-to-hub:
35
+ runs-on: ubuntu-latest
36
+ needs: test # This line makes sync-to-hub dependent on the test job
37
 
38
+ steps:
39
  - name: Checkout for Hugging Face push
40
  uses: actions/checkout@v2
41
  with:
 
53
 
54
  notify:
55
  runs-on: ubuntu-latest
56
+ needs: test
57
 
58
  steps:
59
  - name: Send Discord notification