-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (36 loc) · 1.28 KB
/
build.yml
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
name: Build Package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-path: ~/.virtualenvs
- name: Cache Poetry virtualenv
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install # --no-interaction --no-ansi -vvv # add this for local debugs with "act"
if: steps.cache.outputs.cache-hit != 'true'
- name: Install hips2fits_cutout script
run: |
poetry add cdshealpix@^0.7.0 numba@^0.59.1
git clone https://github.com/cds-astro/hips2fits-cutout.git $HOME/hips2fits-cutout
echo "PYTHONPATH=$HOME/hips2fits-cutout:\$PYTHONPATH" >> $GITHUB_ENV
- name: Test with pytest
run: |
poetry run pytest tests