Skip to content

Commit

Permalink
Normalize gha files
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Oct 8, 2024
1 parent 9f344c2 commit 9b2696d
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 54 deletions.
41 changes: 26 additions & 15 deletions js/.github/workflows/build.yml.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% raw %}
name: Build Status

on:
Expand All @@ -16,7 +15,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: {% raw %}${{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
cancel-in-progress: true

permissions:
Expand All @@ -26,24 +25,29 @@ permissions:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: {% raw %}${{ matrix.os }}{% endraw %}

strategy:
matrix:
os: [ubuntu-latest]
python-version: [{% endraw %}"{{python_version_primary}}"{% raw %}]
python-version: ["{{python_version_primary}}"]
node-version: [20.x]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'

- name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %}
uses: actions/setup-node@v4
with:
node-version: {% raw %}${{ matrix.node-version }}{% endraw %}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
Expand All @@ -55,40 +59,47 @@ jobs:

- name: Lint
run: make lint
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Checks
run: make checks
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Build
run: make build

- name: Test
run: make coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}
name: {% raw %}test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}{% endraw %}
path: |
**/junit.xml
if: ${{ always() }}
if: {% raw %}${{ always() }}{% endraw %}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/junit.xml
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

- name: Make dist
run: make dist
if: ${{ matrix.os == 'ubuntu-latest' }}
{% endraw %}
if: matrix.os == 'ubuntu-latest'

- uses: actions/upload-artifact@v4
with:
name: {% raw %}dist-${{matrix.os}}{% endraw %}
path: dist
if: matrix.os == 'ubuntu-latest'


39 changes: 22 additions & 17 deletions jupyter/.github/workflows/build.yml.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% raw %}
name: Build Status

on:
Expand All @@ -16,7 +15,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: {% raw %}${{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
cancel-in-progress: true

permissions:
Expand All @@ -26,28 +25,28 @@ permissions:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: {% raw %}${{ matrix.os }}{% endraw %}

strategy:
matrix:
os: [ubuntu-latest]
python-version: [{% endraw %}"{{python_version_primary}}"{% raw %}]
python-version: ["{{python_version_primary}}"]
node-version: [20.x]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'

- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: {% raw %}${{ matrix.node-version }}{% endraw %}

- name: Install pnpm
uses: pnpm/action-setup@v4
Expand All @@ -60,40 +59,46 @@ jobs:

- name: Lint
run: make lint
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Checks
run: make checks
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Build
run: make build

- name: Test
run: make coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Upload test results (Python)
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}
name: {% raw %}test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}{% endraw %}
path: |
**/junit.xml
if: ${{ always() }}
if: {% raw %}${{ always() }}{% endraw %}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/junit.xml
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

- name: Make dist
run: make dist
if: ${{ matrix.os == 'ubuntu-latest' }}
{% endraw %}
if: matrix.os == 'ubuntu-latest'

- uses: actions/upload-artifact@v4
with:
name: {% raw %}dist-${{matrix.os}}{% endraw %}
path: dist
if: matrix.os == 'ubuntu-latest'

34 changes: 19 additions & 15 deletions python/.github/workflows/build.yml.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% raw %}
name: Build Status

on:
Expand All @@ -16,7 +15,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: {% raw %}${{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
cancel-in-progress: true

permissions:
Expand All @@ -26,20 +25,20 @@ permissions:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: {% raw %}${{ matrix.os }}{% endraw %}

strategy:
matrix:
os: [ubuntu-latest]
python-version: [{% endraw %}"{{python_version_primary}}"{% raw %}]
python-version: ["{{python_version_primary}}"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'

Expand All @@ -48,39 +47,44 @@ jobs:

- name: Lint
run: make lint
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Checks
run: make checks
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Build
run: make build

- name: Test
run: make coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Upload test results (Python)
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
name: {% raw %}test-results-${{ matrix.os }}-${{ matrix.python-version }}{% endraw %}
path: junit.xml
if: ${{ always() }}
if: {% raw %}${{ always() }}{% endraw %}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/junit.xml
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

- name: Make dist
run: make dist
if: ${{ matrix.os == 'ubuntu-latest' }}
{% endraw %}
if: matrix.os == 'ubuntu-latest'

- uses: actions/upload-artifact@v4
with:
name: {% raw %}dist-${{matrix.os}}{% endraw %}
path: dist
if: matrix.os == 'ubuntu-latest'
15 changes: 8 additions & 7 deletions rust/.github/workflows/build.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

- name: Checks
run: make checks
if: {% raw %}${{ matrix.os == 'ubuntu-latest' }}{% endraw %}
if: matrix.os == 'ubuntu-latest'

- name: Build
run: make build
Expand All @@ -88,35 +88,36 @@ jobs:
- name: Upload test results (Python)
uses: actions/upload-artifact@v4
with:
name: {% raw %}pytest-results-${{ matrix.os }}-${{ matrix.python-version }}{% endraw %}
path: junit.xml
name: {% raw %}test-results-${{ matrix.os }}-${{ matrix.python-version }}{% endraw %}
path: |
**/junit.xml
if: {% raw %}${{ always() }}{% endraw %}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/junit.xml
if: {% raw %}${{ matrix.os == 'ubuntu-latest' }}{% endraw %}
if: matrix.os == 'ubuntu-latest'

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

- name: Make dist
run: |
make dist-rust
make dist-py-sdist
make dist-py-wheel
make dist-check
if: {% raw %}${{ matrix.os == 'ubuntu-latest' }}{% endraw %}
if: matrix.os == 'ubuntu-latest'

- name: Make dist
run: |
make dist-py-wheel
make dist-check
if: {% raw %}${{ matrix.os != 'ubuntu-latest' }}{% endraw %}
if: matrix.os != 'ubuntu-latest'

- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 9b2696d

Please sign in to comment.