Skip to content

Commit

Permalink
Include running regression tests on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
howard-e committed Dec 4, 2024
1 parent b0c04c4 commit 4fa7d7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,22 @@ on:

jobs:
regression:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
CI_NODE_INDEX: [0, 1, 2, 3, 4]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up firefox for macos
if: matrix.os == 'macos-latest'
run: brew install firefox

- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions scripts/regression-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ fi
AVACMD="npm run regression -- -t"
ARGS=''

TEST_FILES=$(git diff --name-only $COMMIT_RANGE | grep -oP 'test/tests/\K.*' | uniq)
TEST_INFRA=$(git diff --name-only $COMMIT_RANGE | grep -oP 'test/(util|index)')
TEST_FILES=$(git diff --name-only $COMMIT_RANGE | perl -nle'print $& while m{test/tests/\K.*}g' | uniq)
TEST_INFRA=$(git diff --name-only $COMMIT_RANGE | perl -nle'print $& while m{test/(util|index)}g')

EXAMPLE_DIRS=$(git diff --name-only $COMMIT_RANGE | grep -oP 'examples/\K[\w-]+(?=/)' | uniq)
EXAMPLE_INFRA=$(echo "$EXAMPLE_DIRS" | grep -P '^(js|css)$')
EXAMPLE_DIRS=$(git diff --name-only $COMMIT_RANGE | perl -nle'print $& while m{examples/\K[\w-]+(?=/)}g' | uniq)
EXAMPLE_INFRA=$(echo "$EXAMPLE_DIRS" | perl -nle'print if m{^(js|css)$}')

PACKAGE_UPDATE=$(git diff --name-only $COMMIT_RANGE | grep -P 'package(-lock)?\.json')
PACKAGE_UPDATE=$(git diff --name-only $COMMIT_RANGE | perl -nle'print if m{package(-lock)?\.json}')

if [[ $TEST_INFRA || $EXAMPLE_INFRA || $PACKAGE_UPDATE ]]
then
Expand Down

0 comments on commit 4fa7d7d

Please sign in to comment.