Skip to content

Commit

Permalink
tasks and build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkasirer committed Aug 30, 2024
1 parent 52f96bb commit 5bf2c8e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
name: build
name: Build & test

on:
push:
branches:
- main

pull_request:
branches:
- main
branches:
- main

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python: ['3.10']
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies + package
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: pytest
- name: Install package
run: |
pip install .
- name: Install package
run: |
invoke test
8 changes: 7 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Everything here is shamelessly copied from compas_invocations2"""
"""Everything here is shamelessly copied from https://github.com/compas-dev/compas_invocations2"""

import sys
import glob
Expand Down Expand Up @@ -190,3 +190,9 @@ def prepare_changelog(ctx):
changelog.write(content.replace("## ", UNRELEASED_CHANGELOG_TEMPLATE, 1))

ctx.run('git add CHANGELOG.md && git commit -m "Prepare changelog for next release"')


@invoke.task
def test(ctx):
"""Run tests."""
ctx.run("pytest")

0 comments on commit 5bf2c8e

Please sign in to comment.