@@ -3,17 +3,20 @@ name: Run Pytests
33on :
44 push :
55 paths :
6- - ' **.py'
7- - ' **.yaml'
8- - ' **.yml'
9- - ' **.toml'
6+ - ' **.py'
7+ - ' **.yaml'
8+ - ' **.yml'
9+ - ' **.toml'
1010 pull_request :
1111 types :
12- - opened
13- - synchronize
14- - reopened
12+ - opened
13+ - synchronize
14+ - reopened
1515 paths :
16- - ' **.py'
16+ - ' **.py'
17+ - ' **.yaml'
18+ - ' **.yml'
19+ - ' **.toml'
1720
1821defaults :
1922 run :
2326 LANG : en_US.utf-8
2427 LC_ALL : en_US.utf-8
2528 PYTHON_VERSION : ' 3.10'
26- PROJECT_NAME : volttron-lib-base -historian
29+ PROJECT_NAME : volttron-lib-sql -historian
2730
2831jobs :
2932
3033 run-tests :
3134 strategy :
3235 matrix :
33- os : [ubuntu-20.04, ubuntu-22.04]
34- python : ['3.8', '3.9', '3.10' ]
36+ os : [ " ubuntu-22.04" ]
37+ python : [ "3.10", "3.11" ]
3538
3639 runs-on : ${{ matrix.os }}
3740
3841 steps :
39- - run : echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
40- - run : echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
41- - run : echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
42+ - run : echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
43+ - run : echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
44+ - run : echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
4245
4346 # ----------------------------------------------
4447 # check-out repo and set-up python
4548 # ----------------------------------------------
46- - name : Checkout code
47- uses : actions/checkout@v3
49+ - name : Checkout code
50+ uses : actions/checkout@v3
4851
49- - name : Set up Python ${{ matrix.python }}
50- id : setup-python
51- uses : actions/setup-python@v2
52- with :
53- python-version : ${{ matrix.python }}
52+ - name : Set up Python ${{ matrix.python }}
53+ id : setup-python
54+ uses : actions/setup-python@v2
55+ with :
56+ python-version : ${{ matrix.python }}
5457
5558 # ----------------------------------------------
5659 # ----- install & configure poetry -----
5760 # ----------------------------------------------
58- - name : Install Poetry
59- uses : snok/install-poetry@v1
60- with :
61- version : 1.2.2
62- virtualenvs-create : true
63- virtualenvs-in-project : true
64- installer-parallel : true
61+ - name : Install Poetry
62+ uses : snok/install-poetry@v1
63+ with :
64+ virtualenvs-create : true
65+ virtualenvs-in-project : true
66+ installer-parallel : true
6567
66- # #----------------------------------------------
67- # # load cached venv if cache exists
68- # #----------------------------------------------
69- # - name: Load cached venv
70- # id: cached-poetry-dependencies
71- 72- # with:
73- # path: .venv
74- # key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
75- # #----------------------------------------------
76- # # install dependencies if cache does not exist
77- # #----------------------------------------------
78- # - name: Install dependencies
79- # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
80- # run: poetry install --no-interaction --no-root
68+ # ----------------------------------------------
69+ # install your root project, and run tests.
70+ # ----------------------------------------------
71+ - name : Check file existence
72+ id : check_files
73+ uses : andstor/file-existence-action@v2
74+ with :
75+ files : tests
8176
8277 # ----------------------------------------------
8378 # install your root project, and run tests.
8479 # ----------------------------------------------
85- - name : Check file existence
86- id : check_files
87- uses : andstor/file-existence-action@v2
88- with :
89- files : tests
90-
91- - name : Install library and run tests
92- if : steps.check_files.outputs.files_exists == 'true'
93- run : |
94- poetry install --no-interaction
95- poetry add --group dev pytest-github-actions-annotate-failures
96- poetry run pytest --cov=src tests/
80+ - name : Install library and run tests
81+ if : steps.check_files.outputs.files_exists == 'true'
82+ run : |
83+ poetry install --no-interaction
84+ poetry add --group dev pytest-github-actions-annotate-failures
85+ poetry run pytest --cov=src
0 commit comments