fix: handle when auto updater receives a non-200 from GitHub API #876
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: | |
pull_request: | |
push: | |
branches: main | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: Test (${{matrix.elixir}}/${{matrix.otp}}) | |
strategy: | |
matrix: | |
otp: [26.1.2] | |
elixir: [1.15.7] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{matrix.otp}}-${{matrix.elixir}}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{matrix.otp}}-${{matrix.elixir}}- | |
- name: Install Dependencies | |
run: mix deps.get | |
- name: Start EPMD | |
run: epmd -daemon | |
- name: Compile | |
env: | |
MIX_ENV: test | |
run: mix compile | |
- name: remove tmp dir | |
run: rm -rf tmp | |
- name: Run Tests | |
run: elixir --erl '-kernel prevent_overlapping_partitions false' -S mix test --max-cases 1 | |
formatter: | |
runs-on: ubuntu-latest | |
name: Formatter | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
id: beam | |
with: | |
otp-version: 26.1.2 | |
elixir-version: 1.15.7 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- | |
- name: Install Dependencies | |
run: mix deps.get | |
- name: Run Formatter | |
run: mix format --check-formatted | |
dialyzer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Elixir | |
id: beam | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: 26.1.2 | |
elixir-version: 1.15.7 | |
# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones | |
# Cache key based on Elixir & Erlang version (also useful when running in matrix) | |
- name: Restore PLT cache | |
uses: actions/cache/restore@v3 | |
id: plt_cache | |
with: | |
key: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- | |
path: | | |
priv/plts | |
- name: Install Dependencies | |
run: mix deps.get | |
# Create PLTs if no cache was found | |
- name: Create PLTs | |
if: steps.plt_cache.outputs.cache-hit != 'true' | |
run: mix dialyzer --plt | |
# By default, the GitHub Cache action will only save the cache if all steps in the job succeed, | |
# so we separate the cache restore and save steps in case running dialyzer fails. | |
- name: Save PLT cache | |
uses: actions/cache/save@v3 | |
if: steps.plt_cache.outputs.cache-hit != 'true' | |
id: plt_cache_save | |
with: | |
key: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('**/mix.lock') }} | |
path: | | |
priv/plts | |
- name: Run dialyzer | |
run: mix dialyzer --format github | |
nix-build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v23 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: elixir-tools | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix build --accept-flake-config | |
- run: nix flake check --accept-flake-config |