Skip to content

Commit

Permalink
Update action workflow for each sub-project
Browse files Browse the repository at this point in the history
  • Loading branch information
ypkang committed Sep 8, 2024
1 parent 0635b57 commit c6a48b8
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 82 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Linting and Pre-commit checks
name: Linting and Pre-commit checks for jac-cloud

on:
pull_request:
paths:
- "jac-cloud/**"
push:
branches:
- main
paths:
- "jac-cloud/**"

jobs:
pre-commit:
pre-commit-cloud:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-cloud
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -22,4 +29,4 @@ jobs:
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files
run: pre-commit run --all-files
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linting and Pre-commit checks
name: Linting and Pre-commit checks for jaclang

on:
pull_request:
Expand All @@ -11,8 +11,11 @@ on:
- "jaclang/**"

jobs:
pre-commit:
pre-commit-jaclang:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jaclang
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -26,4 +29,4 @@ jobs:
run: pip install pre-commit

- name: Run pre-commit hooks
run: cd jaclang; pre-commit run --all-files
run: pre-commit run --all-files
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Linting and Pre-commit checks
name: Linting and Pre-commit checks for jac-mtllm

on:
pull_request:
paths:
- "jac-mtllm/**"
push:
branches:
- main
paths:
- "jac-mtllm/**"

jobs:
pre-commit:
pre-commit-mtllm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-mtllm
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -22,4 +29,4 @@ jobs:
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files
run: pre-commit run --all-files
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Release to PyPI
name: Release jac-cloud to PYPI

on: workflow_dispatch
# on:
# push:
# tags:
# - 'v*.*.*'

jobs:
release:
release-cloud:
name: Release
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-cloud

steps:
- name: Checkout code
Expand All @@ -25,14 +24,6 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools wheel twine
# - name: Extract version from tag
# id: get_version
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

# - name: Update version in setup.py
# run: |
# sed -i 's/VERSION = ".*"/VERSION = "${{ steps.get_version.outputs.VERSION }}"/' setup.py

- name: Build package
run: python setup.py sdist bdist_wheel

Expand All @@ -42,12 +33,12 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
# - name: Create GitHub Release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: PyPI Release
name: Release jaclang to PYPI

on:
workflow_dispatch:

jobs:
release:
release-jaclang:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jaclang

steps:
- name: Checkout code
Expand All @@ -22,7 +25,7 @@ jobs:
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry build
poetry publish
- run: pip install githubrelease
- run: python scripts/gh_release.py
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# - run: pip install githubrelease
# - run: python scripts/gh_release.py
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: PyPI Release
name: Release jac-mtllm to PYPI

on:
workflow_dispatch:

jobs:
release:
release-mtllm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-mtllm
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -23,7 +26,7 @@ jobs:
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
continue-on-error: true
- run: pip install githubrelease markdown-to-json
- run: python scripts/gh_release.py
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# - run: pip install githubrelease markdown-to-json
# - run: python scripts/gh_release.py
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: VSCE Release
name: Release VSCE

on:
workflow_dispatch:

jobs:
release:
release-vsce:
permissions:
contents: write
issues: write
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
name: Run Plugin Tests
name: Run tests for jac-cloud

on:
pull_request:
paths:
- "jac-cloud/**"
push:
branches:
- main
paths:
- "jac-cloud/**"

jobs:
test:
test-cloud:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-cloud
env:
SHOW_ENDPOINT_RETURNS: true
REDIS_HOST: redis://localhost
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Tests
name: Run tests for jaclang

on:
pull_request:
paths:
- "jaclang/**"
push:
branches:
- main
paths:
- "jaclang/**"

jobs:
test:
test-jaclang:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jaclang
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -25,4 +32,4 @@ jobs:
pip install pytest
- name: Run tests
run: pytest -x
run: pytest -x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tests
name: Run tests for jac-mtllm

on:
pull_request:
Expand All @@ -7,8 +7,11 @@ on:
- main

jobs:
test:
test-mtllm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jac-mtllm
steps:
- name: Check out code
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Plugin Tests
name: Run tests for jac-streamlit

on:
pull_request:
Expand All @@ -7,8 +7,11 @@ on:
- main

jobs:
streamlit:
test-streamlit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tool_plugins/streamlit
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -25,7 +28,7 @@ jobs:
pip install pytest
- name: Install Plugin
run: pip install -e support/plugins/streamlit
run: pip install -e .

- name: Run tests
run: pytest support/plugins/streamlit
run: pytest
25 changes: 0 additions & 25 deletions jaclang/.github/workflows/pre_commit.yml

This file was deleted.

0 comments on commit c6a48b8

Please sign in to comment.