Migrate amoc-arsenal-xmpp to erlangsolutions #145
This file contains hidden or 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: CI | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| name: OTP ${{matrix.otp_vsn}} | |
| strategy: | |
| matrix: | |
| otp_vsn: ['28', '27'] | |
| rebar_vsn: ['3.25'] | |
| runs-on: 'ubuntu-24.04' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp_vsn }} | |
| rebar3-version: ${{ matrix.rebar_vsn }} | |
| - name: Compile project | |
| run: rebar3 compile | |
| - name: run xref check | |
| run: rebar3 xref | |
| - name: run dialyzer check | |
| run: rebar3 dialyzer | |
| integration_test: | |
| name: docker container test with OTP ${{matrix.otp_vsn}} | |
| strategy: | |
| matrix: | |
| otp_vsn: ['28', '27'] | |
| rebar_vsn: ['3.25'] | |
| runs-on: 'ubuntu-24.04' | |
| env: | |
| OTP_RELEASE: ${{ matrix.otp_vsn }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: build docker image | |
| run: ./ci/build_docker_image.sh | |
| - name: test docker image | |
| run: ./ci/start_amoc_cluster.sh | |
| - name: test docker image | |
| run: ./ci/test_amoc_cluster.sh | |
| - name: test docker image | |
| run: ./ci/stop_amoc_cluster.sh | |
| docker_image: | |
| name: build and push multi-platform docker image | |
| runs-on: 'ubuntu-24.04' | |
| needs: | |
| - test | |
| - integration_test | |
| if: github.ref == 'refs/heads/master' | |
| env: | |
| OTP_RELEASE: 27.3 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_PASS }} | |
| - name: build multi-platform docker image | |
| run: ./ci/build_and_push_docker_image.sh |