Skip to content

Commit

Permalink
Merge the rest of hsfs GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 2, 2024
1 parent 5cc4c95 commit 17665a4
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 175 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/mkdocs-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,29 @@ jobs:

- name: install deps
working-directory: ./python
run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev]
run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[python,dev]

- name: generate autodoc
run: python3 auto_doc.py

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('java/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "adopt"

- name: Build java doc documentation
working-directory: ./java
run: mvn clean install javadoc:javadoc javadoc:aggregate -DskipTests && cp -r target/site/apidocs ../docs/javadoc

- name: setup git
run: |
git config --global user.name Mike
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/mkdocs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: mkdocs-release

on:
push:
branches: [branch-*\.*]
branches: [branch-*]

jobs:
publish-release:
Expand All @@ -26,16 +26,33 @@ jobs:

- name: install deps
working-directory: ./python
run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev]
run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[python,dev]

- name: generate autodoc
run: python3 auto_doc.py

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('java/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "adopt"

- name: Build java doc documentation
working-directory: ./java
run: mvn clean install javadoc:javadoc javadoc:aggregate -DskipTests && cp -r target/site/apidocs ../docs/javadoc

- name: setup git
run: |
git config --global user.name Mike
git config --global user.email mike@docs.hopsworks.ai
- name: mike deploy docs
run: |
mike deploy ${{ env.RELEASE_VERSION }} ${{ env.MAJOR_VERSION }} -u --push
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/optional-dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: optional-dependency

on: pull_request

env:
APP_API_KEY: ${{ secrets.APP_API_KEY }}
ENABLE_HOPSWORKS_USAGE: "false"

jobs:
unit_tests_no_great_expectations:
name: Unit Testing (No Great Expectations)
Expand All @@ -26,4 +30,4 @@ jobs:
- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
run: pytest python/tests
run: pytest python/tests
7 changes: 2 additions & 5 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: python
name: python-lint

on: pull_request

env:
APP_API_KEY: ${{ secrets.APP_API_KEY }}

jobs:
lint_stylecheck:
name: Lint and Stylecheck
Expand Down Expand Up @@ -46,4 +43,4 @@ jobs:
- name: ruff format --check $ALL_CHANGED_FILES
env:
ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }}
run: ruff format $ALL_CHANGED_FILES
run: ruff format $ALL_CHANGED_FILES
57 changes: 4 additions & 53 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,11 @@ name: python

on: pull_request

jobs:
lint_stylecheck:
name: Lint and Stylecheck
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Get all changed files
id: get-changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
src:
- 'python/**/*.py'
- '!python/tests/**/*.py'
test:
- 'python/tests/**/*.py'
- name: install deps
run: pip install ruff==0.4.2

- name: ruff on python files
if: steps.get-changed-files.outputs.src_any_changed == 'true'
env:
SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }}
run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES

- name: ruff on test files
if: steps.get-changed-files.outputs.test_any_changed == 'true'
env:
TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }}
run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES

- name: ruff format --check $ALL_CHANGED_FILES
env:
ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }}
run: ruff format $ALL_CHANGED_FILES
env:
APP_API_KEY: ${{ secrets.APP_API_KEY }}
ENABLE_HOPSWORKS_USAGE: "false"

jobs:
unit_tests_ubuntu_utc:
name: Unit Testing (Ubuntu)
needs: lint_stylecheck
Expand Down Expand Up @@ -73,8 +35,6 @@ jobs:
run: python --version

- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
run: pytest python/tests

unit_tests_ubuntu_pandas:
Expand Down Expand Up @@ -102,8 +62,6 @@ jobs:
run: python --version

- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
run: pytest python/tests

unit_tests_ubuntu_local:
Expand Down Expand Up @@ -131,8 +89,6 @@ jobs:
run: python --version

- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
run: pytest python/tests

unit_tests_ubuntu_typechecked:
Expand All @@ -155,7 +111,6 @@ jobs:

- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
HOPSWORKS_RUN_WITH_TYPECHECK: "true"
run: pytest python/tests
continue-on-error: true
Expand Down Expand Up @@ -185,8 +140,6 @@ jobs:
run: python --version

- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
run: pytest python/tests

unit_tests_windows_local:
Expand Down Expand Up @@ -217,6 +170,4 @@ jobs:
run: pip freeze

- name: Run Pytest suite
env:
ENABLE_HOPSWORKS_USAGE: "false"
run: pytest python/tests
53 changes: 0 additions & 53 deletions hsfs/.github/workflows/mkdocs-master.yml

This file was deleted.

59 changes: 0 additions & 59 deletions hsfs/.github/workflows/mkdocs-release.yml

This file was deleted.

0 comments on commit 17665a4

Please sign in to comment.