diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bc407b..69fbb6d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,29 +1,47 @@ name: OpenTelemetry Zipkin Tests -on: [push] +on: + pull_request: + branches: + - 'master' + push: + branches: + - 'master' jobs: build: name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} - - services: - zipkin: - image: openzipkin/zipkin-slim - ports: - - 9411:9411 - strategy: matrix: - otp_version: [21, 22] - os: [ubuntu-latest] - - container: - image: erlang:${{ matrix.otp_version }} - + otp_version: ['24.0.6', '23.3.4.7', '22.3.4.21'] + rebar3_version: ['3.16.1'] + os: [ubuntu-18.04] + include: + - otp_version: '21.3.8.24' + rebar3_version: '3.15.2' + os: ubuntu-18.04 + env: + OTP_VERSION: ${{ matrix.otp_version }} + OTEL_TRACES_EXPORTER: "none" steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + - name: Run Zipkin + run: docker-compose up -d + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3_version }} + elixir-version: '1.11.1' + - uses: actions/cache@v2 + name: Cache + with: + path: | + _build + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-2 + restore-keys: | + ${{ runner.os }}-build-${{ matrix.otp_version }}-2- - name: Compile run: rebar3 compile - - name: Run tests + - name: Common Test tests run: rebar3 ct