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 04eb891
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 85 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,5 @@ jobs:
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files
run: pre-commit run --files $(find . -type f)

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 --files $(find . -type f)
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 --files $(find . -type f)
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,14 +1,21 @@
name: tests
name: Run tests for jac-mtllm

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

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,14 +1,21 @@
name: Plugin Tests
name: Run tests for jac-streamlit

on:
pull_request:
paths:
- "tool_plugins/streamlit/**"
push:
branches:
- main
paths:
- "tool_plugins/streamlit/**"

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 +32,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
3 changes: 2 additions & 1 deletion jac-cloud/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repos:
rev: 7.1.0
hooks:
- id: flake8
args: ["--config=jac-cloud/.flake8"]
additional_dependencies: [pep8-naming, flake8_import_order, flake8_docstrings, flake8_comprehensions, flake8_bugbear, flake8_annotations, flake8_simplify]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand All @@ -23,4 +24,4 @@ repos:
exclude: 'venv|__jac_gen__|tests|setup.py'
args:
- --follow-imports=silent
- --ignore-missing-imports
- --ignore-missing-imports
3 changes: 2 additions & 1 deletion jac-mtllm/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repos:
rev: 6.1.0
hooks:
- id: flake8
args: ["--config=jac-mtllm/.flake8"]
additional_dependencies: [pep8-naming, flake8_import_order, flake8_docstrings, flake8_comprehensions, flake8_bugbear, flake8_annotations, flake8_simplify]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand All @@ -22,4 +23,4 @@ repos:
additional_dependencies: [types-PyYAML, types-requests]
args:
- --follow-imports=silent
- --ignore-missing-imports
- --ignore-missing-imports
25 changes: 0 additions & 25 deletions jaclang/.github/workflows/pre_commit.yml

This file was deleted.

Loading

0 comments on commit 04eb891

Please sign in to comment.