Skip to content

Commit 253d5b9

Browse files
committed
ci: fix tests
1 parent 6ec4ab5 commit 253d5b9

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

.github/workflows/regression.yml

+8-17
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Regression tests
22

33
on: [push, pull_request]
44

5-
env:
6-
VALE_VERSION: 3.2.2
7-
85
jobs:
96

107
tests:
@@ -14,20 +11,6 @@ jobs:
1411
uses: actions/checkout@v4
1512
with:
1613
fetch-depth: 0
17-
- name: Check cached Vale
18-
id: cache-vale
19-
uses: actions/cache@v4
20-
with:
21-
path: bin
22-
key: vale-${{ env.VALE_VERSION }}
23-
- name: Install Vale
24-
if: steps.cache-vale.outputs.cache-hit != 'true'
25-
run: |
26-
wget https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz
27-
mkdir bin && tar -xvzf vale_${VALE_VERSION}_Linux_64-bit.tar.gz -C bin
28-
echo "./bin" >> $GITHUB_PATH
29-
- name: Verify Vale
30-
run: vale --version
3114
- name: Setup PNPM
3215
uses: pnpm/action-setup@v3
3316
with:
@@ -39,5 +22,13 @@ jobs:
3922
cache: 'pnpm'
4023
- name: Install dependencies
4124
run: pnpm install --frozen-lockfile
25+
- name: Install Vale
26+
uses: supplypike/setup-bin@v3
27+
with:
28+
uri: 'https://github.com/errata-ai/vale/releases/download/v${{ env.VALE_VERSION }}/vale_${{ env.VALE_VERSION }}_Linux_64-bit.tar.gz'
29+
name: 'vale'
30+
version: ${{ env.VALE_VERSION }}
31+
env:
32+
VALE_VERSION: 3.2.2
4233
- name: Run tests
4334
run: pnpm test

test/rules.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ function trimEveryLine(multiline) {
1919
.join("\n");
2020
}
2121

22-
test.each(scenario)(`Testing %s`, async (rule, expected) => {
22+
test.each(scenario)(`Test: %s`, async (rule, expected) => {
2323
let result;
2424
try {
2525
const cwd = path.resolve(process.cwd(), fixturesDirectory, rule);
26+
console.log(cwd);
2627
const output = await execa(command, args, { cwd: cwd });
2728
result = output.stdout;
2829
} catch (error) {

0 commit comments

Comments
 (0)