Skip to content

.gitignore: Ignore Intellij configs #353

.gitignore: Ignore Intellij configs

.gitignore: Ignore Intellij configs #353

Workflow file for this run

---
name: PR testing
# run on each PR and on merges to main
on:
pull_request: {}
push:
branches:
- main
permissions:
contents: read
jobs:
# this validates the Gemfile and Rakefile that will be copied into the build container
# they provide tasks that will be used to compile ezbake projects and build packages
validate-staging-templates:
name: Validate Ruby
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
working-directory: resources/puppetlabs/lein-ezbake/template/global
- run: bundle env
working-directory: resources/puppetlabs/lein-ezbake/template/global
get-ezbake-version:
name: get ezbake version
runs-on: ubuntu-24.04
outputs:
ezbake_version: ${{ steps.version.outputs.ezbake_version }}
steps:
- uses: actions/checkout@v6
# install clojure tools
- name: Install Clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: latest # Leiningen
# used during the openvoxserver/db builds
- name: Get release version
id: version
run: echo "ezbake_version=$(lein update-in :plugins conj '[lein-pprint "1.3.2"]' -- pprint :version | tr -d '\"')" >> "$GITHUB_OUTPUT"
test:
runs-on: ubuntu-24.04
needs: validate-staging-templates
strategy:
matrix:
java: [ '17', '21' ]
env:
LEIN_HOME: local
name: Java ${{ matrix.java }} tests
steps:
- uses: actions/checkout@v6
- name: setup java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
# install clojure tools
- name: Install Clojure tools
uses: DeLaGuardo/[email protected]
with:
# Install just one or all simultaneously
# The value must indicate a particular version of the tool, or use 'latest'
# to always provision the latest version
lein: latest # Leiningen
- run: lein test
build:
name: build ${{ matrix.project }}
runs-on: ubuntu-24.04
needs:
- get-ezbake-version
strategy:
fail-fast: false
matrix:
include:
- project: openvox-server
repository: 'OpenVoxProject/openvox-server'
- project: openvoxdb
repository: 'OpenVoxProject/openvoxdb'
steps:
- name: checkout openvox-server
uses: actions/checkout@v6
with:
repository: ${{ matrix.repository }}
submodules: true
fetch-depth: 0 # So we fetch all history and tags and can build non-tagged versions
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Display Ruby environment
run: bundle env
- name: get ${{ matrix.project }} version
id: version
run: |
DESCRIBE=$(git describe --abbrev=9)
echo "describe=${DESCRIBE//-/.}" >> $GITHUB_OUTPUT
- name: build ${{ matrix.project }} with ezbake ${{ needs.get-ezbake-version.outputs.ezbake_version }}
run: bundle exec rake vox:build
env:
EZBAKE_REPO: "https://github.com/${{ github.repository }}" # https://github.com/actions/checkout?tab=readme-ov-file#usage
EZBAKE_BRANCH: $GITHUB_REF # https://docs.github.com/en/actions/reference/workflows-and-actions/variables
EZBAKE_VERSION: ${{ needs.get-ezbake-version.outputs.ezbake_version }} # ensures that we used the built version of ezbake and don't pull from clojars.org
- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.project }}-${{ steps.version.outputs.describe }}-ezbake-${{ needs.get-ezbake-version.outputs.ezbake_version }}
path: output/
retention-days: 1 # quite low retention, because the artifacts are quite large
overwrite: true # overwrite old artifacts if a PR runs again (artifacts are per PR * per project)
tests:
if: always()
needs:
- test
- validate-staging-templates
- build
- get-ezbake-version
runs-on: ubuntu-24.04
name: Test suite
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}