Skip to content

Commit 585eec6

Browse files
authored
Merge pull request #5508 from marmelab/github-actions
Migrate CI to Github Actions
2 parents b29ce3c + 68e635c commit 585eec6

20 files changed

+238
-160
lines changed

.github/workflows/test.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Test - action"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
pull_request:
9+
10+
jobs:
11+
unit-test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Use Node.js LTS
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '14.x'
20+
- uses: bahmutov/npm-install@v1
21+
- name: Build
22+
run: make build
23+
- name: Lint
24+
run: make lint
25+
- name: Unit Tests
26+
run: make test-unit
27+
env:
28+
CI: true
29+
30+
e2e-test:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
- name: Use Node.js LTS
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: '14.x'
39+
- uses: bahmutov/npm-install@v1
40+
- name: Build
41+
run: make build
42+
- name: e2e Tests
43+
run: make test-e2e
44+
env:
45+
CI: true
46+

.travis.yml

-26
This file was deleted.

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ help:
44
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
55

66
install: package.json ## install dependencies
7-
@yarn
7+
@if [ "$(CI)" != "true" ]; then \
8+
echo "Full install..."; \
9+
yarn; \
10+
fi
11+
@if [ "$(CI)" = "true" ]; then \
12+
echo "Frozen install..."; \
13+
yarn --frozen-lockfile; \
14+
fi
815

916
run: run-simple
1017

packages/ra-core/src/auth/Authenticated.spec.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('<Authenticated>', () => {
2020
<Foo />
2121
</Authenticated>
2222
);
23-
expect(queryByText('Foo')).toBeDefined();
23+
expect(queryByText('Foo')).not.toBeNull();
2424
await wait();
2525
expect(dispatch).toHaveBeenCalledTimes(0);
2626
});

0 commit comments

Comments
 (0)