diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f9ab657 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,48 @@ +name: microsetta-admin CI + +on: + push: + branches: [ master ] + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: flake8 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: install dependencies + run: python -m pip install --upgrade pip + - name: lint + run: | + pip install -q flake8 + make lint + + build-and-test: + needs: lint + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: 3.7 + - name: Install dependencies + shell: bash -l {0} + run: | + conda create --name test-microsetta-public python=3.7 + conda activate test-microsetta-public + conda install --yes --file ci/conda_requirements.txt + pip install -r ci/pip_requirements.txt + make install + - name: Tests + shell: bash -l {0} + run: | + conda activate test-microsetta-public + make test