From d6a4df8a63f2a8340295745eff63326966e64839 Mon Sep 17 00:00:00 2001 From: Matthieu Monsch Date: Tue, 8 Aug 2023 10:14:50 -0700 Subject: [PATCH] Tweak CI flow --- .github/workflows/ci.yml | 24 ++++++++++++++++-------- .github/workflows/release.yml | 2 ++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8fb7f1..7a32911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,11 +33,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Extract version - id: extract-version - run: | - PACKAGE_VERSION="$(./scripts/version.sh)" - echo "version=$PACKAGE_VERSION" >>"$GITHUB_OUTPUT" - name: Download Hadoop run: | echo "HADOOP_HOME=$(./scripts/hadoop.sh download)" >>"$GITHUB_ENV" @@ -56,6 +51,22 @@ jobs: run: HDFSCLI_TEST_URL="$WEBHDFS_URL" python -m pytest --cov=hdfs - name: Test on HTTPFS run: HDFSCLI_TEST_URL="$HTTPFS_URL" HDFSCLI_NOSNAPSHOT=1 python -m pytest --cov=hdfs + - name: Stop HDFS + if: always() + run: ./scripts/hadoop.sh stop + tag: + name: Tag + needs: + - test + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v3 + - name: Extract version + id: extract-version + run: | + PACKAGE_VERSION="$(./scripts/version.sh)" + echo "version=$PACKAGE_VERSION" >>"$GITHUB_OUTPUT" - name: Check if tag exists uses: mukunku/tag-exists-action@v1.1.0 id: check-version @@ -72,6 +83,3 @@ jobs: github_repo: ${{ github.repository }} github_token: ${{ secrets.GITHUB_TOKEN }} version: ${{ steps.extract-version.outputs.version }} - - name: Stop HDFS - if: always() - run: ./scripts/hadoop.sh stop diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 456b33d..d09340f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,8 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.10' + - name: Install + run: pip install twine - name: Publish run: | python setup.py sdist