Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use erlef actions #732

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 58 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,53 @@ on:
push:
branches:
- master

jobs:
job1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still a WIP?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah yeah, do not worry about this one, this is purely using as an experiment

runs-on: ubuntu-latest
outputs:
elixir: ${{ steps.set-matrix.outputs.elixir }}
steps:
- id: set-matrix
run: |
elixir_matrix=""
elixir_matrix+=$(echo -n '"{include":[')
elixir_matrix+=$(echo -n '{"elixir":"1.10.4","otp":"23.0"},g')
elixir_matrix+=$(echo -n '{"elixir":"1.17.0","otp":"27.0"}')
elixir_matrix+=$(echo -n ']}')
echo "elixir=$elixir_matrix" >> $GITHUB_OUTPUT

job2:
needs: job1
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.elixir) }}
name: Elixir ${{ matrix.elixir }} with OTP ${{ matrix.otp }}
steps:
- run: echo "Matrix - Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }}"

# VersionMatrix:
# runs-on: ubuntu-latest
# outputs:
# elixir: ${{ steps.set-matrix.outputs.elixir }}
# steps:
# - name: Set
# id: set-matrix
# run: echo 'elixir=[{"version":"1.10.4","otp":"23.0"},{"version":"1.11.2","otp":"23.0"}]' >> "$GITHUB_OUTPUT"

# TestingMatrix:
# runs-on: ubuntu-latest
# needs: VersionMatrix
# strategy:
# matrix: ${{ fromJson(needs.VersionMatrix.outputs.elixir) }}
# # name: Elixir ${{ matrix.version }} with OTP ${{ matrix.otp }}
# steps:
# - name: echo
# env:
# MATRIX: ${{ needs.VersionMatrix.outputs.elixir }}
# # run: echo "${{ matrix.otp }} ${{ matrix.version }}"
# run: echo $MATRIX

Test:
runs-on: ubuntu-latest
env:
Expand All @@ -16,16 +62,20 @@ jobs:
uses: actions/checkout@v1

- name: Set up Elixir
id: beam
uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict

- name: Install Dependencies
uses: erlef/gh-actions/preview/mix-deps-get@main
with:
elixir-version: ${{ steps.beam.outputs.elixir-version }}
erlang-version: ${{ steps.beam.outputs.otp-version }}

- name: Update SSL Verify Fun
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.update ssl_verify_fun

- name: Run Tests
Expand All @@ -38,16 +88,17 @@ jobs:
uses: actions/checkout@v1

- name: Set up Elixir
id: beam
uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict

- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
uses: erlef/gh-actions/preview/mix-deps-get@main
with:
elixir-version: ${{ steps.beam.outputs.elixir-version }}
erlang-version: ${{ steps.beam.outputs.otp-version }}

- name: Run Formatter
run: mix format --check-formatted
Expand Down
Loading