Skip to content

Commit

Permalink
testing the book (#25)
Browse files Browse the repository at this point in the history
* testing the book

* testing the pre-commit

* book not uploading if act

* book not uploading if act
  • Loading branch information
tschm authored Jan 18, 2025
1 parent b8910ff commit b47a764
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/act.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ jobs:
working-directory: template
workflow: ci.yml

- name: Test book flow
uses: cvxgrp/cradle/actions/flow@main
with:
working-directory: template
workflow: book.yml

- name: Test pre-commit flow
uses: cvxgrp/cradle/actions/flow@main
with:
working-directory: template
workflow: pre-commit.yml

#- name: Run the pre-commit flow
# id: flow_pre_commit
# shell: bash
Expand Down
28 changes: 11 additions & 17 deletions template/.github/workflows/book.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,29 @@ on:
- push


permissions:
checks: write
contents: read

jobs:

marimo:
permissions:
checks: write
contents: write

runs-on: "ubuntu-latest"
steps:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/marimo@v2.0.5
- uses: cvxgrp/.github/actions/uv/marimo@v2.0.6
with:
source_folder: book/marimo

pdoc:
permissions:
checks: write
contents: write

runs-on: "ubuntu-latest"
steps:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/pdoc@v2.0.5
- uses: cvxgrp/.github/actions/uv/pdoc@v2.0.6
with:
source-folder: src/{{ project_name }}

Expand All @@ -41,22 +37,18 @@ jobs:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/coverage@v2.0.5
- uses: cvxgrp/.github/actions/uv/coverage@v2.0.6
with:
tests-folder: src/tests
source-folder: src/{{ project_name }}

jupyter:
permissions:
checks: write
contents: write

runs-on: "ubuntu-latest"
steps:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/jupyter@v2.0.5
- uses: cvxgrp/.github/actions/uv/jupyter@v2.0.6

book:
runs-on: "ubuntu-latest"
Expand All @@ -69,4 +61,6 @@ jobs:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/book@v2.0.5
- name: Upload the book
if: ${% raw %}{{ env.ACT != 'true' }}{% endraw %} # Skip if running with 'act'
uses: cvxgrp/.github/actions/book@v2.0.6
9 changes: 3 additions & 6 deletions template/.github/workflows/pre-commit.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,18 @@ permissions:

jobs:
test:
permissions:
checks: write
contents: write

runs-on: ubuntu-latest
steps:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/coverage@v2.0.5
- uses: cvxgrp/.github/actions/uv/coverage@v2.0.6
with:
source-folder: src/{{ project_name }}
tests-folder: src/tests

- name: Coveralls GitHub Action
if: ${% raw %}{{ env.ACT != 'true' }}{% endraw %} # Skip if running with 'act'
uses: coverallsapp/github-action@v2
with:
files: artifacts/tests/coverage/coverage.info
Expand All @@ -35,7 +32,7 @@ jobs:
- name: Checkout [${% raw %}{{ github.repository }}{% endraw %}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/deptry@v2.0.5
- uses: cvxgrp/.github/actions/uv/deptry@v2.0.6
with:
source-folder: src/{{ project_name }}

Expand Down

0 comments on commit b47a764

Please sign in to comment.