Skip to content

test: add a few more tests #22

test: add a few more tests

test: add a few more tests #22

Workflow file for this run

name: PR Entrypoint
on:
pull_request: {}
workflow_dispatch:
inputs:
ref:
required: false
jobs:
init:
runs-on: ubuntu-latest
outputs:
BUILDER_VSN: ${{ steps.env_setup.outputs.BUILDER_VSN }}
OTP_VSN: ${{ steps.env_setup.outputs.OTP_VSN }}
ELIXIR_VSN: ${{ steps.env_setup.outputs.ELIXIR_VSN }}
BUILDER: ${{ steps.env_setup.outputs.BUILDER }}
EMQX_IMAGE: ${{ steps.env_setup.outputs.EMQX_IMAGE }}
UBUNTU_VSN: ${{ steps.env_setup.outputs.UBUNTU_VSN }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.inputs.ref }}
- name: Set up environment
id: env_setup
run: |
source test/scripts/env.sh
echo "BUILDER_VSN=$EMQX_BUILDER_VSN" | tee -a "$GITHUB_OUTPUT"
echo "EMQX_OTP_VSN=$OTP_VSN" | tee -a "$GITHUB_OUTPUT"
echo "OTP_VSN=$OTP_VSN" | tee -a "$GITHUB_OUTPUT"
echo "ELIXIR_VSN=$ELIXIR_VSN" | tee -a "$GITHUB_OUTPUT"
echo "BUILDER=$EMQX_BUILDER" | tee -a "$GITHUB_OUTPUT"
echo "EMQX_IMAGE=$EMQX_IMAGE" | tee -a "$GITHUB_OUTPUT"
echo "UBUNTU_VSN=$UBUNTU_VSN" | tee -a "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-latest
container: ${{ needs.init.outputs.builder }}
needs:
- init
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.inputs.ref }}
- name: build
run: |
rebar3 escriptize
cp _build/default/bin/emqx_data_converter ./
- uses: actions/upload-artifact@v4.3.5
with:
name: emqx_data_converter
path: emqx_data_converter
retention-days: 1
if-no-files-found: error
integration_test:
needs:
- init
- build
uses: ./.github/workflows/integration_tests.yaml
with:
ubuntu_vsn: ${{ needs.init.outputs.UBUNTU_VSN }}
emqx_image: ${{ needs.init.outputs.EMQX_IMAGE }}
otp: ${{ needs.init.outputs.OTP_VSN }}
elixir: ${{ needs.init.outputs.ELIXIR_VSN }}