Skip to content

Commit f0d285a

Browse files
authored
Create CL_test_UKMO.yml
1 parent 76beb96 commit f0d285a

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/CL_test_UKMO.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will install Python dependencies and run tests on different python versions
2+
# more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
schedule:
8+
- cron: '48 13 * * *'
9+
push:
10+
branches:
11+
- metoffice
12+
pull_request:
13+
workflow_dispatch:
14+
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-22.04
19+
strategy:
20+
matrix:
21+
python-version: ['3.7']
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
ref: metoffice
26+
- name: Set up python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Display Python version
31+
run: python -c "import sys; print(sys.version)"
32+
# - name: Cache PIP and Poetry
33+
# uses: actions/cache@v2.1.6
34+
# with:
35+
# path: |
36+
# ~/.cache/pip/
37+
# ~/.cache/pypoetry/
38+
# key: pip&poetry-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
39+
- name: Install poetry
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install poetry
43+
- name: Install package
44+
run: poetry install --only main
45+
- name: Display installed packages
46+
run: |
47+
poetry env list
48+
poetry show
49+
- name: Run tests
50+
run: poetry run python -m unittest discover tests/

0 commit comments

Comments
 (0)