fix: properly quote labels with dots #91
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
name: Test and build | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# | |
# run all the tests and upload test results | |
# | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup gradle | |
uses: ./.github/actions/gradlew | |
- name: Setup playwright cache location | |
shell: bash | |
run: echo "PLAYWRIGHT_BROWSERS_PATH=.playwright" >> $GITHUB_ENV | |
- name: Cache playwright executables | |
uses: actions/cache@v4 | |
with: | |
path: .playwright | |
key: ${{ runner.os }}-playwright | |
- name: Run tests | |
run: ./gradlew check -PexcludeTags=flaky | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: build/reports/tests/test | |
retention-days: 30 | |
- name: Create JAR | |
run: ./gradlew jar -PnoPlaywright | |
- name: Upload Jars | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jars | |
# Use a wildcard to keep the structure | |
path: ./build*/libs/*.jar | |
retention-days: 30 | |
docker: | |
uses: ./.github/workflows/reusable-docker.yaml | |
needs: [ test ] | |
secrets: inherit # pass all secrets to the called workflow | |
with: | |
artifact: jars | |
# publish only on push to main or develop (releases are handled in another workflow) | |
publish: >- | |
${{ github.event_name == 'push' && | |
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }} | |
publish_dockerhub: >- | |
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
deploy-nightly: | |
# | |
# on push to MAIN only, if the tests were successful | |
# build the packages and update nightly release | |
# | |
runs-on: ubuntu-latest | |
needs: [ test, docker ] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup gradle | |
uses: ./.github/actions/gradlew | |
- name: Generate Jar | |
run: ./gradlew jar | |
- name: Generate Jar (No local) | |
run: ./gradlew jar -PnoPlaywright | |
- name: Make jars executable | |
run: ./gradlew exec-jar | |
#- name: Upload Jar | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# path: build/bin/*.jar | |
- name: Create info file | |
run: | | |
echo -e "ref: $GITHUB_REF \ncommit: $GITHUB_SHA\nbuild: $(date +"%Y-%m-%dT%H:%M:%SZ")" > build/bin/info.txt | |
- name: Update nightly release | |
uses: pyTooling/Actions/releaser@main | |
with: | |
tag: nightly | |
rm: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: build/bin/*.* |