Skip to content

Commit

Permalink
fix: Fix dependencies (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Jan 19, 2024
1 parent 436669d commit 0f0feec
Show file tree
Hide file tree
Showing 3 changed files with 1,677 additions and 1,596 deletions.
84 changes: 72 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: build
name: main

on: [push, pull_request]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check-pr:
check-branch:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -22,11 +26,26 @@ jobs:
remote_branch: origin/main
pr_sha: ${{ github.event.pull_request.head.sha }}

build:
runs-on: ubuntu-latest
tests:
needs: check-branch
strategy:
matrix:
python_version:
- '3.8.1'
- '3.9'
- '3.10'
- '3.11'
# - '3.12'
os:
- 'ubuntu'
# - 'macos'
# poetry is failing on windows: https://github.com/python-poetry/poetry/issues/1031
# - 'windows'

runs-on: ${{ matrix.os }}-latest
timeout-minutes: 10
concurrency:
group: ci-${{ github.ref }}
group: ci-tests-${{ matrix.os }}-${{ matrix.python_version }}-${{ github.ref }}
cancel-in-progress: true

defaults:
Expand All @@ -35,21 +54,62 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2

- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
mamba-version: "1.*"
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
activate-environment: artbox
use-mamba: true
miniforge-variant: Mambaforge
auto-update-conda: true
conda-solver: libmamba

- name: Install dependencies
run: poetry install

- name: Run tests
run: makim tests.unittest

- name: Run style checks
run: makim tests.linter

linter-and-docs:
needs: check-branch
runs-on: ubuntu-latest
timeout-minutes: 10

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

concurrency:
group: ci-linter-docs-${{ matrix.os }}-${{ matrix.python_version }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
activate-environment: artbox
auto-update-conda: true
conda-solver: libmamba

- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry install
- name: Test documentation generation
run: makim docs.build

- name: Run style checks
if: success() || failure()
run: |
pre-commit install
makim tests.linter
- name: Setup tmate session
if: "${{ failure() && (contains(github.event.pull_request.labels.*.name, 'ci:enable-debugging')) }}"
uses: mxschmitt/action-tmate@v3
4 changes: 3 additions & 1 deletion conda/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ channels:
- conda-forge
dependencies:
- pygobject
- python >=3.8.1
- python >=3.8.1,<3.12
- pip
- poetry
- nodejs # used by semantic-release
- shellcheck
- pip:
- paginate
Loading

0 comments on commit 0f0feec

Please sign in to comment.