Skip to content

Elixir stdlib tests #1039

Elixir stdlib tests

Elixir stdlib tests #1039

Workflow file for this run

name: Elixir stdlib tests
on:
# This is needed to trigger the workflow manually from the "Actions" tab in the repo.
workflow_dispatch:
inputs: {}
# Every day at 9am.
schedule:
- cron: "0 9 * * *"
# Every time a change makes it to the main branch of this library, so we maaaaybe
# catch regressions in the library itself.
push:
branches:
- main
jobs:
stdlib-test:
name: Elixir standard library tests (OTP ${{ matrix.otp }}, Elixir ${{ matrix.elixir }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- otp: "25.3"
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
# TODO: remove this once we'll compile Elixir from source again.
elixir-version: 1.14.4-otp-25
- name: Get SHA of Elixir's main branch
id: get-elixir-sha
run: |
echo ::set-output name=sha::$( curl -u "u:${{ github.token }}" https://api.github.com/repos/elixir-lang/elixir/git/ref/heads/main | jq .object.sha | tr -d '"' )
- name: Check out latest Elixir
uses: actions/checkout@v3
with:
repository: elixir-lang/elixir
ref: ${{ steps.get-elixir-sha.outputs.sha }}
path: elixir_src
- name: Cache compiled Elixir
id: cache-compiled-elixir
uses: actions/cache@v3
with:
path: elixir_src
key: ${{ runner.os }}-elixir-${{ steps.get-elixir-sha.outputs.sha }}
# TODO: for now, Elixir main doesn't compile some deps. We need to
# go back and do these steps once Elixir works again against Erlang.
# - name: Compile Elixir
# if: steps.cache-compiled-elixir.outputs.cache-hit != 'true'
# working-directory: elixir_src
# run: make
# # Needs to happen even on cache hits.
# - name: Add Elixir binaries to the path
# run: echo "$PWD/elixir_src/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
mix do local.hex --force, local.rebar --force
mix do deps.get --only test, deps.compile
- name: Run stdlib tests
run: mix test --only stdlib