Skip to content

Commit 12013b2

Browse files
committed
Merge branch 'dev'
2 parents d3fc3c1 + 658123f commit 12013b2

File tree

21 files changed

+3507
-2308
lines changed

21 files changed

+3507
-2308
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@changesets/changelog-github",
55
{ "repo": "frontity/frontity" }
66
],
7-
"commit": false,
7+
"commit": true,
88
"linked": [],
99
"access": "public",
1010
"baseBranch": "dev"

.changeset/witty-seahorses-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"frontity": patch
3+
---
4+
5+
Remove the typescript option from `frontity create-package` because it is not implemented yet. Once it is implemented, we can add it back.

.github/workflows/budget.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"path": "/*",
4+
"resourceSizes": [
5+
{
6+
"resourceType": "script",
7+
"budget": 100
8+
}
9+
]
10+
}
11+
]

.github/workflows/e2e-tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: e2e tests
2+
3+
on: [push]
4+
5+
jobs:
6+
e2e-tests:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
ci_node_total: [3]
12+
ci_node_index: ["all", "module", "es5"]
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
18+
- name: Setup npm cache
19+
uses: actions/cache@v1
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
26+
- name: Install dependencies (root)
27+
run: npm ci
28+
env:
29+
CI: true
30+
31+
- name: Run e2e tests
32+
uses: cypress-io/github-action@v1
33+
with:
34+
start: npm run e2e:prod:${{ matrix.ci_node_index }}
35+
wait-on: "http://localhost:3001"
36+
wait-on-timeout: 180
37+
env: HEADLESS=true
38+
working-directory: e2e
39+
config: video=true,screenshotOnRunFailure=true
40+
41+
- name: Upload screenshots on failure
42+
uses: actions/upload-artifact@v1
43+
if: failure()
44+
with:
45+
name: cypress-screenshots
46+
path: e2e/screenshots
47+
48+
- name: Upload videos
49+
uses: actions/upload-artifact@v1
50+
if: always()
51+
with:
52+
name: cypress-videos
53+
path: e2e/videos

.github/workflows/lighthouse.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: lighthouse
2+
3+
on: [push]
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v1
12+
13+
- name: Setup Node
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
18+
- name: Setup npm cache
19+
uses: actions/cache@v1
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Check if it should deploy to production
30+
id: deploy
31+
if: github.ref == 'refs/heads/master'
32+
run: echo "::set-output name=args::--prod"
33+
34+
- name: Deploy to now
35+
run: npx lerna run now --parallel -- -- ${{ steps.deploy.outputs.args }}
36+
env:
37+
NOW_TOKEN: ${{ secrets.NOW_TOKEN }}
38+
39+
- name: Create alias for this deploy
40+
run: npx lerna run now:alias --parallel
41+
env:
42+
COMMIT_SHA: ${{ github.sha }}
43+
NOW_TOKEN: ${{ secrets.NOW_TOKEN }}
44+
45+
lighthouse:
46+
runs-on: ubuntu-latest
47+
needs: deploy
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v1
52+
53+
- name: Audit URLs using Lighthouse
54+
uses: treosh/lighthouse-ci-action@v2
55+
with:
56+
runs: 3
57+
temporaryPublicStorage: true
58+
configPath: ./.github/workflows/lighthouserc.json
59+
budgetPath: ./.github/workflows/budget.json
60+
urls: |
61+
https://mars-theme-$COMMIT_SHA.now.sh/
62+
https://mars-theme-$COMMIT_SHA.now.sh/2016/the-beauties-of-gullfoss/
63+
env:
64+
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
65+
COMMIT_SHA: ${{ github.sha }}
66+
67+
- name: Save results
68+
uses: actions/upload-artifact@v1
69+
with:
70+
name: lighthouse-results
71+
path: ".lighthouseci"

.github/workflows/lighthouserc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"ci": {
3+
"assert": {
4+
"assertions": {
5+
"categories:performance": ["error", { "minScore": 0.99 }],
6+
"categories:accessibility": ["error", { "minScore": 1 }],
7+
"categories:best-practices": ["error", { "minScore": 1 }],
8+
"categories:seo": ["error", { "minScore": 0.96 }]
9+
}
10+
}
11+
}
12+
}

.github/workflows/unit-tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: unit tests
2+
3+
on: [push]
4+
5+
jobs:
6+
unit-tests:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [8.x, 10.x, 12.x]
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v1
16+
17+
- name: Setup Node ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
22+
- name: Setup npm cache
23+
uses: actions/cache@v1
24+
with:
25+
path: ~/.npm
26+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
27+
restore-keys: |
28+
${{ runner.os }}-node-
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
env:
33+
CI: true
34+
35+
- name: Run unit tests
36+
run: npm run test:ci
37+
env:
38+
CI: true

.huskyrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"hooks": {
3-
"pre-commit": "lint-staged",
4-
"pre-push": "npm run test:all"
3+
"pre-commit": "lint-staged"
54
}
65
}

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

cypress.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)