Skip to content

Commit

Permalink
CI #159 combine & update
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Oct 4, 2023
1 parent 6d1db13 commit 0411e9f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 35 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/black.yml

This file was deleted.

54 changes: 51 additions & 3 deletions .github/workflows/conda_unit_test.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,76 @@
name: Unit Tests

on: [push, pull_request]
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: # allow manual triggering

defaults:
run:
shell: bash -l {0}

jobs:

lint:
name: Code style
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8
run: |
flake8
- name: Run black
uses: rickstaa/action-black@v1
with:
black_args: ". --check"

build:

runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- 3.11
max-parallel: 5

steps:
- uses: actions/checkout@v2

- name: Create Python ${{ matrix.python-version }} environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
cache-environment: true
cache-environment-key: env-key-${{ matrix.python-version }}
condarc: |
channel-priority: flexible
environment-file: environment.yml
environment-name: hklpy-test-${{ matrix.python-version }}
environment-name: hklpy-test-py-${{ matrix.python-version }}
create-args: >-
coveralls
pytest
pytest-cov
python=${{ matrix.python-version }}
- name: conda environments
shell: bash -l {0}
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/flake8.yml

This file was deleted.

0 comments on commit 0411e9f

Please sign in to comment.