diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..da24d7f --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index e69de29..e7ed33f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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