Skip to content

Commit

Permalink
CI: Added hardcoded git branch commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
bre1470 committed Nov 10, 2023
1 parent 7abde7e commit 96a24ca
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/highcharts-headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
name: Node unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
Expand All @@ -33,14 +33,11 @@ jobs:
name: Cypress tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 2
- uses: actions/checkout@v4
with:
clean: false
fetch-depth: 2
- name: Include main branch
run: |
git remote set-branches origin 'master'
git fetch --depth=1
- uses: actions/setup-node@v3
with:
node-version: lts/*
Expand Down Expand Up @@ -134,8 +131,8 @@ jobs:
# runs-on: macos-latest
# steps:
# ### SETUP ###
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/*
# cache: 'npm'
Expand Down
35 changes: 20 additions & 15 deletions .github/workflows/highcharts-visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
node-version: [lts/*]
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 2
run: |
git remote set-branches origin 'master'
git fetch --depth=1
git checkout master
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -42,19 +42,22 @@ jobs:
- name: Build Highcharts
run: npx gulp scripts

- run: npx karma start test/karma-conf.js --iff Core,Data,Series,Shared --tests highcharts/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
- run: npx karma start test/karma-conf.js --iff Stock,Data,Series,Shared --tests stock/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
- run: npx karma start test/karma-conf.js --iff Maps,Data,Series,Shared --tests maps/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
- run: npx karma start test/karma-conf.js --iff Gantt,Data,Series,Shared --tests gantt/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
- name: Test main branch for reference
run: |
npx karma start test/karma-conf.js --tests highcharts/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
npx karma start test/karma-conf.js --tests stock/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
npx karma start test/karma-conf.js --tests maps/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
npx karma start test/karma-conf.js --tests gantt/*/* --reference --browsercount 2 --no-fail-on-empty-test-suite
- name: Checkout current branch
uses: actions/checkout@v4
run: git checkout -

with:
clean: false
fetch-depth: 2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -65,10 +68,12 @@ jobs:
- name: Build Highcharts
run: npx gulp scripts

- run: npx karma start test/karma-conf.js --iff Core,Data,Series,Shared --tests highcharts/*/* --single-run --browsercount 2 --visualcompare || true
- run: npx karma start test/karma-conf.js --iff Stock,Data,Series,Shared --tests stock/*/* --single-run --browsercount 2 --visualcompare || true
- run: npx karma start test/karma-conf.js --iff Maps,Data,Series,Shared --tests maps/*/* --single-run --browsercount 2 --visualcompare || true
- run: npx karma start test/karma-conf.js --iff Gantt,Data,Series,Shared --tests gantt/*/* --single-run --browsercount 2 --visualcompare || true
- name: Test current branch and compare
run: |
npx karma start test/karma-conf.js --iff Core,Data,Series,Shared --tests highcharts/*/* --single-run --browsercount 2 --visualcompare || true
npx karma start test/karma-conf.js --iff Stock,Data,Series,Shared --tests stock/*/* --single-run --browsercount 2 --visualcompare || true
npx karma start test/karma-conf.js --iff Maps,Data,Series,Shared --tests maps/*/* --single-run --browsercount 2 --visualcompare || true
npx karma start test/karma-conf.js --iff Gantt,Data,Series,Shared --tests gantt/*/* --single-run --browsercount 2 --visualcompare || true
- name: Save test results where both an reference.svg and candidate.svg exists
run: |
Expand Down

0 comments on commit 96a24ca

Please sign in to comment.