diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6f806c..873d8f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: Build on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] permissions: contents: read @@ -22,56 +22,56 @@ jobs: otp-version: 24.3.4 - elixir-version: 1.12 otp-version: 23.3.4 - - elixir-version: 1.11 - otp-version: 23.3.4 - - elixir-version: '1.10' - otp-version: 22.3.4 - - elixir-version: 1.9 - otp-version: 22.3.4 - - elixir-version: 1.8 - otp-version: 21.3.8 + # - elixir-version: 1.11 + # otp-version: 23.3.4 + # - elixir-version: '1.10' + # otp-version: 22.3.4 + # - elixir-version: 1.9 + # otp-version: 22.3.4 + # - elixir-version: 1.8 + # otp-version: 21.3.8 steps: - - uses: actions/checkout@v3 - - name: Set up Elixir - uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f - with: ${{matrix.environment}} - - name: Restore dependencies cache - uses: actions/cache@v3 - with: - path: deps/ - key: deps-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} - - name: Restore build cache - uses: actions/cache@v3 - with: - path: _build/test/ - key: build-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} - - name: Install dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get - mix compile - - name: Restore PLT cache - uses: actions/cache@v2 - id: plt_cache - with: - key: | - ${{ runner.os }}-${{ matrix.environment.elixir-version }}-${{ matrix.environment.otp-version }}-plt - restore-keys: | - ${{ runner.os }}-${{ matrix.environment.elixir-version }}-${{ matrix.environment.otp-version }}-plt - path: | - priv/plts + - uses: actions/checkout@v3 + - name: Set up Elixir + uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f + with: ${{matrix.environment}} + - name: Restore dependencies cache + uses: actions/cache@v3 + with: + path: deps/ + key: deps-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} + - name: Restore build cache + uses: actions/cache@v3 + with: + path: _build/test/ + key: build-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} + - name: Install dependencies + run: | + mix local.rebar --force + mix local.hex --force + mix deps.get + mix compile + - name: Restore PLT cache + uses: actions/cache@v2 + id: plt_cache + with: + key: | + ${{ runner.os }}-${{ matrix.environment.elixir-version }}-${{ matrix.environment.otp-version }}-plt + restore-keys: | + ${{ runner.os }}-${{ matrix.environment.elixir-version }}-${{ matrix.environment.otp-version }}-plt + path: | + priv/plts - - name: Create PLTs - if: steps.plt_cache.outputs.cache-hit != 'true' - run: mix dialyzer --plt - env: - MIX_ENV: test + - name: Create PLTs + if: steps.plt_cache.outputs.cache-hit != 'true' + run: mix dialyzer --plt + env: + MIX_ENV: test - - name: Run dialyzer - run: mix dialyzer --format github - env: - MIX_ENV: test + - name: Run dialyzer + run: mix dialyzer --format github + env: + MIX_ENV: test build: runs-on: ubuntu-20.04 name: Build and Test on Elixir ${{matrix.environment.elixir-version}} / OTP ${{matrix.environment.otp-version}} @@ -84,45 +84,45 @@ jobs: otp-version: 24.3.4 - elixir-version: 1.12 otp-version: 23.3.4 - - elixir-version: 1.11 - otp-version: 23.3.4 - - elixir-version: '1.10' - otp-version: 22.3.4 - - elixir-version: 1.9 - otp-version: 22.3.4 - - elixir-version: 1.8 - otp-version: 21.3.8 - - elixir-version: 1.7 - otp-version: 21.3.8 + # - elixir-version: 1.11 + # otp-version: 23.3.4 + # - elixir-version: "1.10" + # otp-version: 22.3.4 + # - elixir-version: 1.9 + # otp-version: 22.3.4 + # - elixir-version: 1.8 + # otp-version: 21.3.8 + # - elixir-version: 1.7 + # otp-version: 21.3.8 steps: - - uses: actions/checkout@v3 - - name: Set up Elixir - uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f - with: ${{matrix.environment}} - - name: Restore dependencies cache - uses: actions/cache@v3 - with: - path: deps/ - key: deps-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} - - name: Restore build cache - uses: actions/cache@v3 - with: - path: _build/test/ - key: build-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} - - name: Install dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get - mix compile - - name: Run tests with coverage - if: matrix.environment.elixir-version == '1.14' - run: mix coveralls.github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MIX_ENV: test - - name: Run tests - if: matrix.environment.elixir-version != '1.14' - run: mix test - env: - MIX_ENV: test + - uses: actions/checkout@v3 + - name: Set up Elixir + uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f + with: ${{matrix.environment}} + - name: Restore dependencies cache + uses: actions/cache@v3 + with: + path: deps/ + key: deps-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} + - name: Restore build cache + uses: actions/cache@v3 + with: + path: _build/test/ + key: build-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }} + - name: Install dependencies + run: | + mix local.rebar --force + mix local.hex --force + mix deps.get + mix compile + - name: Run tests with coverage + if: matrix.environment.elixir-version == '1.14' + run: mix coveralls.github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MIX_ENV: test + - name: Run tests + if: matrix.environment.elixir-version != '1.14' + run: mix test + env: + MIX_ENV: test