-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the build after merging the support branch for 1.9 into the main …
…branch.
- Loading branch information
Showing
2 changed files
with
100 additions
and
10 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 |
---|---|---|
|
@@ -24,6 +24,96 @@ defaults: | |
shell: bash | ||
|
||
jobs: | ||
test-python: | ||
strategy: | ||
matrix: | ||
python-version: [ "3.10" ] | ||
runs-on: ubuntu-22.04 | ||
name: Test Pramen-Py | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: setup poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.4.2 | ||
|
||
- name: install dependencies | ||
working-directory: "./pramen-py" | ||
run: make --silent install | ||
|
||
- name: test | ||
working-directory: "./pramen-py" | ||
env: | ||
ENV: ci | ||
run: make --silent test | ||
|
||
release-python: | ||
needs: [ "test-python" ] | ||
runs-on: ubuntu-22.04 | ||
name: Release Python artifact | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- name: Prepare the release branch | ||
id: release_branch1 | ||
working-directory: "./pramen" | ||
run: | | ||
VERSION=$(grep "ThisBuild / version" version.sbt | cut -d\" -f2 | sed 's/-SNAPSHOT//') | ||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI/CD bot" | ||
git checkout -b release/$VERSION | ||
git push --set-upstream origin release/$VERSION | ||
- name: Update version number | ||
id: release_branch | ||
working-directory: "./pramen-py" | ||
env: | ||
VERSION: ${{ steps.release_branch1.outputs.VERSION }} | ||
run: | | ||
PY_VERSION=$(grep -m 1 ^version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3) | ||
if [[ "$PY_VERSION" != "$VERSION" ]]; then | ||
sed -i "s/version = \"$PY_VERSION\"/version = \"$VERSION\"/g" pyproject.toml | ||
git add pyproject.toml | ||
git commit -m "Update version number to $VERSION" | ||
git push | ||
fi | ||
- name: install project dependencies | ||
run: | | ||
sudo apt install -y --no-install-recommends \ | ||
libssl-dev \ | ||
make | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.4.2 | ||
|
||
- name: Install dependencies | ||
working-directory: "./pramen-py" | ||
run: poetry install --no-interaction --no-root | ||
|
||
- name: build and publish the wheel to jfrog | ||
working-directory: "./pramen-py" | ||
env: | ||
ENV: pypi | ||
PRAMENPY_PYPI_TOKEN: ${{ secrets.PRAMENPY_PYPI_TOKEN }} | ||
run: make --silent publish | ||
|
||
release-sbt: | ||
runs-on: ubuntu-22.04 | ||
name: Release Scala artifacts | ||
|
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