-
Notifications
You must be signed in to change notification settings - Fork 55
63 lines (52 loc) · 1.6 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Semantic Link Labs
on: [push]
permissions:
contents: write # This is required for actions/checkout@v1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ steps.get-date.outputs.today }}-${{ hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: fabric
python-version: "3.10"
environment-file: environment.yml
channel-priority: strict
- name: Install package
shell: bash -el {0}
run: |
conda info
pip install -e .
# - name: Lint with flake8
# shell: bash -el {0}
# run: |
# flake8 sempy_labs tests --count --show-source --statistics
# continue-on-error: false
# - name: Lint with mypy
# shell: bash -el {0}
# run: |
# mypy sempy_labs tests
# continue-on-error: false
- name: Test with pytest
shell: bash -el {0}
run: |
pytest -s tests/