-
Notifications
You must be signed in to change notification settings - Fork 77
32 lines (32 loc) · 1.02 KB
/
pr-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: E2E
on:
pull_request:
branches: [main, rc]
jobs:
e2e:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: skip for markdown only prs
id: markdown-check
run: |
current_branch="$(git rev-parse --abbrev-ref HEAD)"
# diff of branch excluding md
testable_changes=$(git diff --name-only "$current_branch" $(git merge-base "$current_branch" origin/main) -- . ':(exclude)*.md*')
echo "changed files: $testable_changes"
# skip if there are only md changes
if [ -z "$testable_changes" ]; then
echo "skip e2e"
echo "SKIP=true" >> $GITHUB_OUTPUT
else
echo "run e2e"
echo "SKIP=false" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-node@v3
with:
node-version-file: package.json
- run: npm install
- if: steps.markdown-check.outputs.SKIP == 'false'
run: npm run build && npm run test