Skip to content

CI: Add job to build openvox-server #286

CI: Add job to build openvox-server

CI: Add job to build openvox-server #286

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
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/setup-clojure@13.4
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:
- test
strategy:
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
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Display Ruby environment
run: bundle env
- name: build
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
tests:
if: always()
needs:
- test
- validate-staging-templates
- build
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) }}