-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move poetry lock --check to unit tests job (#245)
Poetry is being used for deps installation in unit tests jobs before build job, hence moving poetry lock --check to unit tests jobs. Test run: splunk/splunk-add-on-for-google-workspace#543
- Loading branch information
1 parent
d4002b6
commit 9b8154c
Showing
1 changed file
with
14 additions
and
13 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 |
---|---|---|
|
@@ -471,12 +471,13 @@ jobs: | |
- name: Setup addon | ||
run: | | ||
if [ -f "poetry.lock" ] | ||
then | ||
mkdir -p package/lib || true | ||
pip install poetry==1.5.1 poetry-plugin-export==1.4.0 | ||
poetry export --without-hashes -o package/lib/requirements.txt | ||
poetry export --without-hashes --dev -o requirements_dev.txt | ||
fi | ||
then | ||
mkdir -p package/lib || true | ||
pip install poetry==1.5.1 poetry-plugin-export==1.4.0 | ||
poetry lock --check | ||
poetry export --without-hashes -o package/lib/requirements.txt | ||
poetry export --without-hashes --dev -o requirements_dev.txt | ||
fi | ||
if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi | ||
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com | ||
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://[email protected] | ||
|
@@ -521,12 +522,13 @@ jobs: | |
- name: Setup addon | ||
run: | | ||
if [ -f "poetry.lock" ] | ||
then | ||
mkdir -p package/lib || true | ||
pip install poetry==1.5.1 poetry-plugin-export==1.4.0 | ||
poetry export --without-hashes -o package/lib/requirements.txt | ||
poetry export --without-hashes --dev -o requirements_dev.txt | ||
fi | ||
then | ||
mkdir -p package/lib || true | ||
pip install poetry==1.5.1 poetry-plugin-export==1.4.0 | ||
poetry lock --check | ||
poetry export --without-hashes -o package/lib/requirements.txt | ||
poetry export --without-hashes --dev -o requirements_dev.txt | ||
fi | ||
if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi | ||
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com | ||
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://[email protected] | ||
|
@@ -579,7 +581,6 @@ jobs: | |
then | ||
echo " poetry.lock found " | ||
sudo pip3 install poetry==1.5.1 poetry-plugin-export==1.4.0 | ||
poetry lock --check | ||
poetry export --without-hashes -o requirements.txt | ||
if [ "$(grep -cve '^\s*$' requirements.txt)" -ne 0 ] | ||
then | ||
|