Docker: Add build variant with acme.sh script included #600
Workflow file for this run
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: CI | |
on: | |
push: | |
paths-ignore: | |
- '*.md' | |
- 'examples/**' | |
- 'Formula/**' | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- 'examples/**' | |
- 'Formula/**' | |
jobs: | |
test: | |
name: Test on Erlang/OTP ${{ matrix.otp }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
otp: | |
- '21.0' | |
- '21.3' | |
- '22.0' | |
- '26.0' | |
include: | |
- otp: '21.0' | |
rebar: '3.15.2' | |
- otp: '21.3' | |
rebar: '3.15.2' | |
- otp: '22.0' | |
rebar: '3.18.0' | |
- otp: '26.0' | |
rebar: '3.22.1' | |
fail-fast: false | |
steps: | |
- name: Install prerequisites | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get -qq install libyaml-dev | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Cache Rebar data | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/rebar3 | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.rebar }}-${{ hashFiles('rebar.config') }} | |
- name: Download Erlang/OTP ${{ matrix.otp }} and Rebar ${{ matrix.rebar }} | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
rebar3-version: ${{ matrix.rebar }} | |
version-type: strict | |
- name: Download previous test results | |
run: | | |
mkdir -p _build/test | |
curl -sSL https://github.com/weiss/eturnal/tarball/gh-pages | | |
tar -C _build/test --strip-components=1 --wildcards -xzf - '*/logs/' | |
- name: Download dependencies | |
run: rebar3 get-deps | |
- name: Compile code | |
run: rebar3 compile | |
- name: Build release | |
run: rebar3 release | |
- name: Start release | |
run: _build/default/rel/eturnal/bin/eturnal daemon | |
- name: Ping release | |
run: _build/default/rel/eturnal/bin/eturnal ping | |
- name: Stop release | |
run: _build/default/rel/eturnal/bin/eturnal stop | |
- name: Analyze cross references | |
run: rebar3 xref | |
- name: Perform static code analysis | |
run: rebar3 dialyzer | |
- name: Run black-box tests (CT) | |
run: rebar3 ct | |
- name: Run white-box tests (EUnit) | |
run: rebar3 eunit | |
- name: Check test coverage | |
run: rebar3 cover | |
- name: Check code style | |
run: rebar3 lint # Requires Erlang/OTP 23 or newer: | |
if: matrix.otp != 21.0 && matrix.otp != 21.3 && matrix.otp != 22.0 | |
- name: Build production release | |
run: rebar3 as prod release | |
- name: Build distribution release | |
run: rebar3 as distro release | |
env: | |
SKIP_DEPS: true | |
- name: Upload test and coverage results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: eturnal-tests-otp-${{ matrix.otp }} | |
# | |
# Appending the wildcard character ("*") is a trick to make "test" the | |
# root directory of the uploaded ZIP file: | |
# | |
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions | |
# | |
path: | | |
_build/test*/logs | |
_build/test*/cover | |
publish: | |
name: Publish test results | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref_name == 'master' && github.repository_owner == 'weiss' && always() | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Retrieve test and coverage results | |
uses: actions/download-artifact@v3 | |
with: | |
name: eturnal-tests-otp-26.0 | |
path: public | |
- name: Deploy test and coverage results to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
cname: ci.eturnal.net | |
publish_dir: public/test | |
github_token: ${{ secrets.GITHUB_TOKEN }} |