Merge pull request #319 from cegela/chore/bump-elixir-erlang-otp #955
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 and Deploy | |
| env: | |
| BUILD_OTP_VERSION: '29.0.2' | |
| BUILD_ELIXIR_VERSION: '1.20.1' | |
| on: | |
| push: | |
| schedule: | |
| - cron: "0 1 * * 1" | |
| jobs: | |
| test: | |
| env: | |
| MIX_ENV: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: '${{ env.BUILD_OTP_VERSION }}' | |
| elixir-version: '${{ env.BUILD_ELIXIR_VERSION }}' | |
| - uses: actions/cache@v4 | |
| id: mix-cache | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix | |
| - run: mix deps.get | |
| - run: mix compile --all-warnings --warning-as-errors | |
| - run: mix coveralls | |
| quality: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: '${{ env.BUILD_OTP_VERSION }}' | |
| elixir-version: '${{ env.BUILD_ELIXIR_VERSION }}' | |
| - uses: actions/cache@v4 | |
| id: mix-cache | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix | |
| - run: mix deps.get | |
| - run: mix hex.audit | |
| - run: mix deps.unlock --check-unused | |
| - run: mix deps.audit | |
| - run: mix format --check-formatted | |
| - run: mix compile --all-warnings --warning-as-errors | |
| - run: mix sobelow | |
| - run: mix credo | |
| sarif: | |
| runs-on: ubuntu-24.04 | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: '${{ env.BUILD_OTP_VERSION }}' | |
| elixir-version: '${{ env.BUILD_ELIXIR_VERSION }}' | |
| - uses: actions/cache@v4 | |
| id: mix-cache | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix | |
| - run: mix deps.get | |
| - run: mix compile.machine --format sarif --output sarif.json | |
| - uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: sarif.json | |
| deploy: | |
| needs: test | |
| runs-on: ubuntu-24.04 | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| - uses: rhruiz/git-https-push-action@master | |
| name: Deploy | |
| with: | |
| remoteUrl: ${{ secrets.PUSH_REMOTE }} | |
| skipHooks: false | |
| forcePush: true | |
| - run: "curl -o /dev/null -D - -sf https://cege.la/ | grep -q 'location: https://bit.ly'" | |
| name: verify deploy | |