diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5990cfd94..ae1ed8db1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,10 @@ jobs: - name: Run I-Tests with Maven run: ./mvnw integration-test failsafe:verify -Pitest -B -T4 + coverage: + needs: [build] + runs-on: ubuntu-latest + steps: - name: Upload coverage information uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0f3e9b31e..bece96d6f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,26 +15,27 @@ jobs: uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.9 + cache: pip - name: Upgrade pip run: | # install pip=>20.1 to use "pip cache dir" python3 -m pip install --upgrade pip - - name: Get pip cache dir - id: pip-cache - run: echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('./docs/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- +# - name: Get pip cache dir +# id: pip-cache +# run: echo "::set-output name=dir::$(pip cache dir)" +# +# - name: Cache dependencies +# uses: actions/cache@v3 +# with: +# path: ${{ steps.pip-cache.outputs.dir }} +# key: ${{ runner.os }}-pip-${{ hashFiles('./docs/requirements.txt') }} +# restore-keys: | +# ${{ runner.os }}-pip- - name: Install dependencies run: python3 -m pip install -r ./docs/requirements.txt @@ -48,7 +49,7 @@ jobs: GH_USERNAME: ${{ github.actor }} - name: Pre-fetch the gh-pages branch - run: git fetch + run: git fetch --depth=1 - name: Build docs with MkDocs run: mkdocs build @@ -61,13 +62,13 @@ jobs: # This is for a tagged version - name: Create a new version of documentation and push to GH pages. if: startsWith(github.ref, 'refs/tags/') - run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable --push --rebase --update-aliases + run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable --push --update-aliases - name: Make stable to default. if: startsWith(github.ref, 'refs/tags/') - run: mike set-default stable --push --rebase + run: mike set-default stable --push # This is for develop - name: Deploy latest develop snapshot docs to GH pages. if: github.ref == 'refs/heads/develop' - run: mike deploy snapshot --push --rebase --update-aliases + run: mike deploy snapshot --push --update-aliases diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 240f001ad..2004e7c7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,13 +14,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # Get GPG private key into GPG - - name: Import GPG Owner Trust - run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust - - - name: Import GPG key - run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes - # Setup JDK and Maven - name: Set up JDK 17 uses: actions/setup-java@v3 @@ -44,12 +37,27 @@ jobs: - name: Run I-Tests with Maven run: ./mvnw integration-test failsafe:verify -Pitest -B -T4 -ntp + deploy: + needs: [build] + runs-on: ubuntu-latest + steps: + # Get GPG private key into GPG + - name: Import GPG Owner Trust + run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust + + - name: Import GPG key + run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes + - name: Deploy a new version to central run: ./mvnw deploy -B -ntp -DskipTests -Prelease -Dgpg.keyname="${{secrets.GPG_KEYNAME}}" -Dgpg.passphrase="${{secrets.GPG_PASSPHRASE}}" env: OSS_CENTRAL_USERNAME: "${{ secrets.SONATYPE_USERNAME }}" OSS_CENTRAL_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}" + coverage: + needs: [build] + runs-on: ubuntu-latest + steps: - name: Upload coverage information to CodeCov uses: codecov/codecov-action@v3 with: