switch to upstream erldns #20
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: | |
pull_request: | |
branches: | |
- 'main' | |
push: | |
branches: | |
- 'main' | |
permissions: | |
checks: write | |
jobs: | |
build: | |
name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
otp_version: ['26.0'] | |
rebar3_version: ['3.22.1'] | |
os: [ubuntu-20.04] | |
env: | |
OTP_VERSION: ${{ matrix.otp_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Collector | |
run: docker compose up -d | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp_version }} | |
rebar3-version: ${{ matrix.rebar3_version }} | |
version-type: 'strict' | |
- uses: actions/cache@v3 | |
name: Cache | |
with: | |
path: | | |
_build | |
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-1 | |
restore-keys: | | |
${{ runner.os }}-build-${{ matrix.otp_version }}-1- | |
- name: Compile | |
run: rebar3 compile | |
- name: Common Test tests | |
run: rebar3 ct --cover | |
- name: Upload Test Report | |
uses: actions/upload-artifact@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
name: ct-test-results | |
path: '**/_build/test/logs' | |
- name: Covertool | |
if: ${{ always() }} | |
run: rebar3 covertool generate | |
- uses: codecov/codecov-action@v3 | |
if: ${{ always() }} | |
with: | |
directory: ./_build/test/covertool/ | |
files: service_discovery.covertool.xml,service_discovery_postgres.covertool.xml,service_discovery_grpc.covertool.xml,service_discovery_storage.covertool.xml,service_discovery_http.covertool.xml | |
env_vars: OTP_VERSION | |
- name: XRef | |
run: rebar3 xref | |
dialyzer: | |
name: Dialyze on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
otp_version: ['26.0'] | |
rebar3_version: ['3.22.1'] | |
os: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp_version }} | |
rebar3-version: ${{ matrix.rebar3_version }} | |
version-type: 'strict' | |
- uses: actions/cache@v3 | |
name: Cache | |
with: | |
path: | | |
_build | |
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles('rebar.lock') }}-1 | |
restore-keys: | | |
${{ runner.os }}-dialyzer-${{ matrix.otp_version }}-1- | |
- name: Compile | |
run: rebar3 compile | |
- name: Dialyzer | |
run: rebar3 dialyzer |