Skip to content

Commit 50ba8e8

Browse files
committed
CI: Minor improvements to ci.yml
1 parent 38fe5b9 commit 50ba8e8

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: 2021 The Elixir Team
33
# SPDX-FileCopyrightText: 2012 Plataformatec
44

5-
name: CI
5+
name: Elixir Building and Testing
66

77
on:
88
push:
@@ -53,47 +53,55 @@ jobs:
5353
# when using warnings_as_errors. So we only set ERLC_OPTS
5454
# from Erlang/OTP 27+.
5555
env:
56-
ERLC_OPTS: ${{ matrix.erlc_opts || '' }}
56+
ERLC_OPTS: ${{ matrix.erlc_opts }}
57+
5758
steps:
58-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
59-
with:
60-
fetch-depth: 50
6159
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
6260
with:
6361
otp-version: ${{ matrix.otp_version }}
62+
6463
- name: Set ERL_COMPILER_OPTIONS
6564
if: ${{ matrix.deterministic }}
6665
run: echo "ERL_COMPILER_OPTIONS=deterministic" >> $GITHUB_ENV
66+
6767
- name: Compile Elixir
6868
run: |
6969
make compile
7070
echo "$PWD/bin" >> $GITHUB_PATH
71+
7172
- name: Build info
7273
run: bin/elixir --version
74+
7375
- name: Check format
74-
run: make test_formatted && echo "All Elixir source code files are properly formatted."
76+
run: |
77+
make test_formatted && \
78+
echo "All Elixir source code files are properly formatted."
79+
7580
- name: Erlang test suite
7681
run: make test_erlang
7782
continue-on-error: ${{ matrix.development }}
83+
7884
- name: Elixir test suite
7985
run: make test_elixir
8086
continue-on-error: ${{ matrix.development }}
8187
env:
82-
COVER: "${{ matrix.coverage }}"
83-
84-
- name: "Calculate Coverage"
85-
run: make cover | tee "$GITHUB_STEP_SUMMARY"
86-
if: "${{ matrix.coverage }}"
88+
COVER: ${{ matrix.coverage }}
8789

8890
- name: Check reproducible builds
8991
if: ${{ matrix.deterministic }}
9092
run: |
9193
rm -rf .git
94+
9295
# Recompile System without .git
9396
cd lib/elixir && ../../bin/elixirc -o ebin lib/system.ex && cd -
9497
taskset 1 make check_reproducible
95-
- name: "Upload Coverage Artifact"
96-
if: "${{ matrix.coverage }}"
98+
99+
- name: Calculate Coverage
100+
if: ${{ matrix.coverage }}
101+
run: make cover | tee "$GITHUB_STEP_SUMMARY"
102+
103+
- name: Upload Coverage Artifact
104+
if: ${{ matrix.coverage }}
97105
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
98106
with:
99107
name: TestCoverage
@@ -113,22 +121,29 @@ jobs:
113121
steps:
114122
- name: Configure Git
115123
run: git config --global core.autocrlf input
124+
116125
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
117-
with:
118-
fetch-depth: 50
126+
119127
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
120128
with:
121129
otp-version: ${{ matrix.otp_version }}
130+
122131
- name: Compile Elixir
123132
run: |
124133
Remove-Item -Recurse -Force '.git'
125134
make compile
135+
126136
- name: Build info
127137
run: bin/elixir --version
138+
128139
- name: Check format
129-
run: make test_formatted && echo "All Elixir source code files are properly formatted."
140+
run: |
141+
make test_formatted && \
142+
echo "All Elixir source code files are properly formatted."
143+
130144
- name: Erlang test suite
131145
run: make test_erlang
146+
132147
- name: Elixir test suite
133148
run: |
134149
Remove-Item 'c:/Windows/System32/drivers/etc/hosts'

0 commit comments

Comments
 (0)