-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): Add Build Scripts and Github Workflows (#2)
- Loading branch information
1 parent
815aa26
commit 27e157c
Showing
61 changed files
with
2,458 additions
and
659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: build & test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "docs/**" | ||
- "**.md" | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "docs/**" | ||
- "**.md" | ||
release: | ||
types: [published, edited] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9.9" | ||
- name: Test packages are correct | ||
run: | | ||
cd datahub-classify; | ||
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' | ||
- name: Gradle build (and test) | ||
run: | | ||
./gradlew build | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Test Results (build) | ||
path: | | ||
**/build/reports/tests/test/** | ||
**/build/test-results/test/** | ||
**/junit.*.xml | ||
event-file: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Event File | ||
path: ${{ github.event_path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: pypi-release datahub-classify | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.tag.outputs.tag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Compute Tag | ||
id: tag | ||
run: | | ||
echo "GITHUB_REF: $GITHUB_REF" | ||
SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA") | ||
TAG=$(echo ${GITHUB_REF} | sed -e 's,refs/tags/v,,g' -e 's,refs/tags/acryl,,g') | ||
echo "tag=$TAG" | ||
echo "::set-output name=tag::$TAG" | ||
push_to_pypi: | ||
name: Build and push python package to PyPI | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9.9' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine build | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
run: | | ||
cd datahub-actions | ||
RELEASE_VERSION=${{ needs.setup.outputs.tag }} ./scripts/release.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
__pycache__/ | ||
/venv*/ | ||
*.egg-info/ | ||
.gradle/ | ||
|
||
#VS Code | ||
.vscode | ||
.devcontainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright 2021 Acryl Data, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
buildscript { | ||
apply from: './repositories.gradle' | ||
buildscript.repositories.addAll(project.repositories) | ||
} | ||
|
||
project.ext.externalDependency = [ | ||
] | ||
|
||
allprojects { | ||
apply plugin: 'idea' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'checkstyle' | ||
} | ||
|
||
subprojects { | ||
tasks.withType(Test) { | ||
if (!name.startsWith('integ')) { | ||
useTestNG() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
__pycache__/ | ||
/venv*/ | ||
*.egg-info/ | ||
|
||
#VS Code | ||
.vscode | ||
.devcontainer | ||
|
||
.coverage |
Oops, something went wrong.