Skip to content

Commit

Permalink
Testing CI methods (see #51)
Browse files Browse the repository at this point in the history
  • Loading branch information
sambit-giri committed Aug 13, 2024
1 parent cda2c90 commit bcc2662
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, 3.9, 3.10]

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
environment-file: environment.yml
activate-environment: tools21cm

- name: Install additional dependencies
run: |
conda activate tools21cm
conda install -y pip
pip install .
- name: Run tests
run: |
conda activate tools21cm
pytest
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: python

# Specify the versions of Python to test against
python:
- "3.8"
- "3.9"
- "3.10"

# Install dependencies
install:
- pip install -r requirements.txt
- pip install pytest
- pip install .

# Run tests
script:
- pytest

0 comments on commit bcc2662

Please sign in to comment.