If a test fails, `continue-on-error` will not be evaluated, if it's not set. https://github.com/eksperimental-forks/elixir/actions/runs/19824449905/job/56794214695#step:9:46 2196 doctests, 4913 tests, 1 failure (18 excluded) make: *** [Makefile:289: test_stdlib] Error 2 Error: Process completed with exit code 2. Error: The step failed and an error occurred when attempting to determine whether to continue on error. Error: The template is not valid. .github/workflows/ci.yml (Line: 78, Col: 28): Unexpected value ''
179 lines
4.9 KiB
YAML
179 lines
4.9 KiB
YAML
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: 2021 The Elixir Team
|
|
# SPDX-FileCopyrightText: 2012 Plataformatec
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- "lib/**/*.md"
|
|
|
|
pull_request:
|
|
paths-ignore:
|
|
- "lib/**/*.md"
|
|
|
|
env:
|
|
ELIXIR_ASSERT_TIMEOUT: 2000
|
|
ELIXIRC_OPTS: "--warnings-as-errors"
|
|
LANG: C.UTF-8
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test_linux:
|
|
name: Ubuntu 24.04, OTP ${{ matrix.otp_version }}${{ matrix.deterministic && ' (deterministic)' || '' }}${{ matrix.coverage && ' (coverage)' || '' }}
|
|
runs-on: ubuntu-24.04
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- otp_version: "28.1"
|
|
deterministic: true
|
|
- otp_version: "28.1"
|
|
erlc_opts: "warnings_as_errors"
|
|
docs: true
|
|
coverage: true
|
|
- otp_version: "27.3"
|
|
erlc_opts: "warnings_as_errors"
|
|
- otp_version: "27.0"
|
|
erlc_opts: "warnings_as_errors"
|
|
- otp_version: "26.0"
|
|
- otp_version: master
|
|
development: true
|
|
- otp_version: maint
|
|
development: true
|
|
|
|
# Earlier Erlang/OTP versions ignored compiler directives
|
|
# when using warnings_as_errors. So we only set ERLC_OPTS
|
|
# from Erlang/OTP 27+.
|
|
env:
|
|
ERLC_OPTS: ${{ matrix.erlc_opts || '' }}
|
|
steps:
|
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
|
|
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
|
|
with:
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
- name: Set ERL_COMPILER_OPTIONS
|
|
if: ${{ matrix.deterministic }}
|
|
run: echo "ERL_COMPILER_OPTIONS=deterministic" >> $GITHUB_ENV
|
|
|
|
- name: Compile Elixir
|
|
run: |
|
|
make compile
|
|
echo "$PWD/bin" >> $GITHUB_PATH
|
|
|
|
- name: Build info
|
|
run: bin/elixir --version
|
|
|
|
- name: Check format
|
|
run: make test_formatted && echo "All Elixir source code files are properly formatted."
|
|
|
|
- name: Erlang test suite
|
|
run: make test_erlang
|
|
continue-on-error: ${{ matrix.development == true }}
|
|
|
|
- name: Elixir test suite
|
|
run: make test_elixir
|
|
continue-on-error: ${{ matrix.development == true }}
|
|
env:
|
|
COVER: "${{ matrix.coverage }}"
|
|
|
|
- name: Build docs (ExDoc main)
|
|
if: ${{ matrix.docs }}
|
|
run: |
|
|
cd ..
|
|
git clone https://github.com/elixir-lang/ex_doc.git --depth 1
|
|
cd ex_doc
|
|
../elixir/bin/mix do local.rebar --force + local.hex --force + deps.get + compile
|
|
cd ../elixir/
|
|
git fetch --tags
|
|
DOCS_OPTIONS="--warnings-as-errors" make docs
|
|
|
|
- name: "Calculate Coverage"
|
|
if: ${{ matrix.coverage }}
|
|
run: make cover | tee "$GITHUB_STEP_SUMMARY"
|
|
|
|
- name: "Upload Coverage Artifact"
|
|
if: ${{ matrix.coverage }}
|
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
|
with:
|
|
name: TestCoverage
|
|
path: cover/*
|
|
|
|
- name: Check reproducible builds
|
|
if: ${{ matrix.deterministic }}
|
|
run: |
|
|
rm -rf .git
|
|
# Recompile System without .git
|
|
cd lib/elixir && ../../bin/elixirc -o ebin lib/system.ex && cd -
|
|
taskset 1 make check_reproducible
|
|
|
|
test_windows:
|
|
name: Windows Server 2022, OTP ${{ matrix.otp_version }}
|
|
runs-on: windows-2022
|
|
|
|
strategy:
|
|
matrix:
|
|
otp_version:
|
|
- "28.1"
|
|
- "27.3"
|
|
- "26.2"
|
|
|
|
steps:
|
|
- name: Configure Git
|
|
run: git config --global core.autocrlf input
|
|
|
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
|
|
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
|
|
with:
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
- name: Compile Elixir
|
|
run: |
|
|
Remove-Item -Recurse -Force '.git'
|
|
make compile
|
|
|
|
- name: Build info
|
|
run: bin/elixir --version
|
|
|
|
- name: Check format
|
|
run: make test_formatted && echo "All Elixir source code files are properly formatted."
|
|
|
|
- name: Erlang test suite
|
|
run: make test_erlang
|
|
|
|
- name: Elixir test suite
|
|
run: |
|
|
Remove-Item 'c:/Windows/System32/drivers/etc/hosts'
|
|
make test_elixir
|
|
|
|
license_compliance:
|
|
name: Check Licence Compliance
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- name: Use HTTPS instead of SSH for Git cloning
|
|
id: git-config
|
|
shell: bash
|
|
run: git config --global url.https://github.com/.insteadOf ssh://git@github.com/
|
|
|
|
- name: Checkout project
|
|
id: checkout
|
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
|
|
- name: "Run OSS Review Toolkit"
|
|
id: ort
|
|
uses: ./.github/workflows/ort
|
|
with:
|
|
upload-reports: true
|
|
fail-on-violation: true
|
|
report-formats: "WebApp"
|
|
version: "${{ github.sha }}"
|