handle IMEIs shorter than 15 digits #114
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: | |
pull_request: | |
branches: [ $default-branch ] | |
release: | |
types: | |
- created | |
jobs: | |
test: | |
name: CI | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
otp: [24.3.4, 25.0.4.0, 25.1.2, 26.2, 27.0] | |
container: | |
image: erlang:${{ matrix.otp }}-alpine | |
steps: | |
- name: Prepare | |
run: | | |
apk update | |
apk --no-cache upgrade | |
apk --no-cache add gcc git libc-dev libc-utils libgcc linux-headers make bash \ | |
musl-dev musl-utils ncurses-dev pcre2 pkgconf scanelf \ | |
wget zlib zstd | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: rebar3 compile | |
- name: Run tests | |
run: | | |
rebar3 do xref | |
rebar3 do ct | |
- name: Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.otp }} | |
run: DEBUG=1 rebar3 as test coveralls send || /bin/true | |
- name: Tar Test Output | |
if: ${{ always() }} | |
run: tar -cf - _build/test/logs/ | zstd -15 -o ct-logs-${{ matrix.otp }}.tar.zst | |
- name: Archive Test Output | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-output-${{ matrix.otp }} | |
path: | | |
ct-logs-${{ matrix.otp }}.tar.zst | |
_build/test/logs/*/junit_report.xml | |
publish-test-results: | |
name: "Publish Tests Results" | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
contents: read | |
issues: read | |
if: always() | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: "artifacts/**/junit_report.xml" | |
slack: | |
needs: test | |
runs-on: ubuntu-22.04 | |
if: always() | |
steps: | |
- name: Slack notification | |
uses: 8398a7/action-slack@v3 | |
with: | |
author_name: "GitHub Actions" | |
username: ${{ github.event.repository.name }} | |
icon_emoji: ':octocat:' | |
fields: repo, message, ref, commit, author, action, eventName, workflow, job, took | |
status: ${{ needs.test.result }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
finish: | |
needs: test | |
runs-on: ubuntu-22.04 | |
if: always() | |
steps: | |
- name: Coveralls Finished | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
curl -v -k https://coveralls.io/webhook \ | |
--header "Content-Type: application/json" \ | |
--data "{\"repo_name\":\"$GITHUB_REPOSITORY\",\"repo_token\":\"$GITHUB_TOKEN\",\"payload\":{\"build_num\":$GITHUB_RUN_ID,\"status\":\"done\"}}" |