-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (45 loc) · 1.32 KB
/
testing.yml
File metadata and controls
58 lines (45 loc) · 1.32 KB
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: testing
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Git checkout currect repo
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
show-channel-urls: true
- name: configure conda and install code
shell: bash -l {0}
run: |
conda config --set always_yes yes
conda install mamba
mamba install stackvana galsim pytest black fitsio \
matplotlib astropy
python -m pip install --upgrade pip
pip install -U setuptools
pip install . --user
- name: Lint with black
shell: bash -l {0}
run: |
black src/batsim
- name: Test with pytest
shell: bash -l {0}
run: |
pytest