nidhal baccouri commited on
Commit
44942c1
·
1 Parent(s): a6308c8

fixed release action

Browse files
.github/workflows/production-tests.yml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: production-tests
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ test:
10
+ strategy:
11
+ matrix:
12
+ python-version: [ "3.7", "3.8", "3.9" ]
13
+ os: [ubuntu-latest, macOS-latest] # we can add other os like windows if we want
14
+ runs-on: ${{ matrix.os }}
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/[email protected]
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+
22
+ - name: Install poetry
23
+ run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
24
+
25
+ - name: Set up cache
26
+ uses: actions/[email protected]
27
+ with:
28
+ path: .venv
29
+ key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
30
+ - name: Install dependencies
31
+ run: |
32
+ source "$HOME/.poetry/env"
33
+ poetry config virtualenvs.in-project true
34
+ poetry install
35
+
36
+ - name: Run tests
37
+ run: |
38
+ source "$HOME/.poetry/env"
39
+ poetry run pytest
.github/workflows/release.yml CHANGED
@@ -1,12 +1,9 @@
1
  name: Semantic Release
2
 
3
  on:
4
- push:
5
- tags:
6
- - 'v[0-9]+.[0-9]+.[0-9]+'
7
  workflow_run:
8
  workflows:
9
- - "test"
10
  types:
11
  - completed
12
  jobs:
 
1
  name: Semantic Release
2
 
3
  on:
 
 
 
4
  workflow_run:
5
  workflows:
6
+ - "production-tests"
7
  types:
8
  - completed
9
  jobs:
.github/workflows/test.yml CHANGED
@@ -1,18 +1,13 @@
1
  name: test
2
 
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - dev
8
- pull_request: { }
9
 
10
  jobs:
11
  test:
12
  strategy:
13
  matrix:
14
  python-version: [ "3.7", "3.8", "3.9" ]
15
- os: [ubuntu-latest, macOS-latest]
16
  runs-on: ${{ matrix.os }}
17
  steps:
18
  - uses: actions/checkout@v2
 
1
  name: test
2
 
3
+ on: [push, pull_request]
 
 
 
 
 
4
 
5
  jobs:
6
  test:
7
  strategy:
8
  matrix:
9
  python-version: [ "3.7", "3.8", "3.9" ]
10
+ os: [ubuntu-latest] # we can add other os like macOS-latest
11
  runs-on: ${{ matrix.os }}
12
  steps:
13
  - uses: actions/checkout@v2