fix no files found causes an error #1411
Workflow file for this run
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: build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "*" | |
| workflow_dispatch: {} | |
| jobs: | |
| ci: | |
| name: OTP ${{matrix.otp_vsn}} on ${{matrix.os}} | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| otp_vsn: ['26', '27', '28'] | |
| rebar3_vsn: ['3.25'] | |
| os: [ubuntu-24.04, windows-2022] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| id: setup-beam | |
| with: | |
| otp-version: ${{matrix.otp_vsn}} | |
| rebar3-version: ${{matrix.rebar3_vsn}} | |
| - name: Restore _build | |
| uses: actions/cache@v4 | |
| with: | |
| path: _build | |
| key: "_build-cache-for\ | |
| -os-${{runner.os}}\ | |
| -otp-${{steps.setup-beam.outputs.otp-version}}\ | |
| -rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ | |
| -hash-${{hashFiles('rebar.lock')}}" | |
| - name: Restore rebar3's cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/rebar3 | |
| key: "rebar3-cache-for\ | |
| -os-${{runner.os}}\ | |
| -otp-${{steps.setup-beam.outputs.otp-version}}\ | |
| -rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ | |
| -hash-${{hashFiles('rebar.lock')}}" | |
| - name: Format check | |
| if: ${{ matrix.os == 'ubuntu-24.04' }} | |
| run: rebar3 fmt --check | |
| - name: SAFE check | |
| if: >- | |
| ${{ matrix.os == 'ubuntu-24.04' && | |
| github.event.pull_request.head.repo.full_name == github.repository }} | |
| env: | |
| SAFE_LICENSE: ${{ secrets.SAFE_LICENSE }} | |
| run: rebar3 safe analyse | |
| - name: Run test | |
| run: rebar3 test | |
| env: | |
| SAFE_LICENSE: ${{ secrets.SAFE_LICENSE }} | |
| ERL_FLAGS: "-enable-feature maybe_expr" | |
| - name: Run elvis on elvis | |
| run: | | |
| rebar3 escriptize | |
| _build/default/bin/elvis_core | |
| env: | |
| ERL_FLAGS: "-enable-feature maybe_expr" |