Skip to content

Commit 1734c00

Browse files
committed
Use Github Actions
1 parent 98aaecb commit 1734c00

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

.github/workflows/sentry-ember.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: '@sentry/ember'
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
paths:
7+
- 'packages/ember/**'
8+
9+
env:
10+
lerna-package: '@sentry/ember'
11+
12+
jobs:
13+
test:
14+
name: 'Test Ember Package'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v1
19+
20+
- name: Set up Volta
21+
uses: volta-cli/action@v1
22+
23+
# See https://github.com/actions/cache/blob/master/examples.md#node---yarn for example
24+
- name: Get yarn cache directory path
25+
id: yarn-cache-dir-path
26+
run: echo "::set-output name=dir::$(yarn cache dir)"
27+
28+
- uses: actions/cache@v1
29+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
30+
with:
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-yarn-
35+
36+
- name: Install dependencies (yarn)
37+
run: yarn install
38+
39+
- name: Lint
40+
run: yarn run lint --scope=${{env.lerna-package}}
41+
42+
- name: Build & Test
43+
run: yarn test --scope=${{env.lerna-package}}

packages/ember/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,9 @@
8080
},
8181
"ember-addon": {
8282
"configPath": "tests/dummy/config"
83+
},
84+
"volta": {
85+
"node": "12.18.3",
86+
"yarn": "1.22.4"
8387
}
8488
}

scripts/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -le 8 ]]; then
1515
yarn test --ignore="@sentry/tracing" --ignore="@sentry/react" --ignore="@sentry/ember"
1616
else
1717
yarn install
18-
yarn build
19-
yarn test
18+
yarn build --ignore="@sentry/ember"
19+
yarn test --ignore="@sentry/ember"
2020
fi

0 commit comments

Comments
 (0)