Skip to content

Commit 8ba648f

Browse files
style: fix lint warnings
1 parent eddc8fc commit 8ba648f

4 files changed

Lines changed: 25 additions & 5 deletions

File tree

.github/workflows/_common-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ concurrency:
2323
jobs:
2424
lint:
2525
name: Common Lint
26-
uses: LizardByte/.github/.github/workflows/__call-common-lint.yml@master
26+
uses: LizardByte/.github/.github/workflows/__call-common-lint.yml@feat/workflows/add-actionlint
2727
if: ${{ github.repository != 'LizardByte/.github' }}

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ jobs:
3131
- name: Build matrix with action paths
3232
id: set-matrix
3333
run: |
34-
entries=()
3534
while IFS= read -r file; do
3635
action_dir=$(dirname "$file")
3736
jq --arg action "$action_dir" '.[] | . + {action: $action}' "$file"
3837
done < <(find . -name 'ci-matrix.json') | jq -s '.' > merged-matrix.json
39-
echo "matrix=$(cat merged-matrix.json | jq -c .)" >> $GITHUB_OUTPUT
38+
echo "matrix=$(jq -c . merged-matrix.json)" >> "${GITHUB_OUTPUT}"
4039
4140
test:
4241
name: ${{ matrix.name || format('{0} ({1}, {2})', matrix.action, matrix.runs-on, toJson(matrix.with)) }}
@@ -66,7 +65,7 @@ jobs:
6665
brew install gnu-sed
6766
fi
6867
HOMEBREW_PREFIX="${HOMEBREW_PREFIX:-/usr/local}" # set prefix if not set
69-
echo "$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
68+
echo "$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin" >> "${GITHUB_PATH}"
7069
7170
- name: Process variables in with parameters
7271
id: process-with
@@ -95,7 +94,7 @@ jobs:
9594
"with_params.json"
9695
9796
# Output the processed parameters
98-
echo "with-params=$(jq -c . with_params.json)" >> $GITHUB_OUTPUT
97+
echo "with-params=$(jq -c . with_params.json)" >> "${GITHUB_OUTPUT}"
9998
10099
- name: Debug matrix
101100
shell: bash

.github/workflows/pytest.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ jobs:
4949
-r requirements.txt \
5050
-r requirements-dev.txt
5151
52+
- name: Install pytest problem matcher
53+
env:
54+
DOT_GITHUB_BRANCH: feat/workflows/add-actionlint
55+
shell: bash
56+
run:
57+
mkdir -p ./.github/matchers
58+
curl \
59+
-fsSL \
60+
--retry 3 \
61+
"https://raw.githubusercontent.com/LizardByte/.github/${DOT_GITHUB_BRANCH}/.github/matchers/pytest.json" \
62+
-o ./.github/matchers/pytest.json
63+
echo "::add-matcher::.github/matchers/pytest.json"
64+
5265
- name: Test with pytest
5366
id: test
5467
env:

tests/temp/test_temp.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def test_temp_pass():
2+
# pass on purpose
3+
assert True, "This is a temporary test that is expected to pass."
4+
5+
6+
def test_temp_fail():
7+
# fail on purpose
8+
assert False, "This is a temporary test that is expected to fail."

0 commit comments

Comments
 (0)