Skip to content

Commit cc499fb

Browse files
author
Samuel Bodin
authored
feat: add testing (#203)
1 parent 93e7f9a commit cc499fb

21 files changed

+841
-19970
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ version: 2
2222
jobs:
2323
checkout:
2424
docker:
25-
- image: cimg/node:14.19.1
25+
- image: cimg/node:16.14.2
2626
steps:
2727
- checkout
2828
- run: *yarn
@@ -31,7 +31,7 @@ jobs:
3131
lint:
3232
<<: *defaults
3333
docker:
34-
- image: cimg/node:14.19.1
34+
- image: cimg/node:16.14.2
3535

3636
steps:
3737
- attach-workspace: *attach-work-dir
@@ -40,7 +40,7 @@ jobs:
4040
test:
4141
<<: *defaults
4242
docker:
43-
- image: cimg/node:14.19.1
43+
- image: cimg/node:16.14.2
4444

4545
steps:
4646
- attach-workspace: *attach-work-dir
@@ -49,7 +49,7 @@ jobs:
4949
release:
5050
<<: *defaults
5151
docker:
52-
- image: cimg/node:14.19.1
52+
- image: cimg/node:16.14.2
5353
steps:
5454
- attach-workspace: *attach-work-dir
5555
- run: yarn build && yarn compile && yarn semantic-release

.eslintrc.js

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

.eslintrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": [
3+
"algolia",
4+
"algolia/typescript",
5+
"algolia/jest"
6+
],
7+
"env": {
8+
"es6": true,
9+
"jest": true
10+
},
11+
"plugins": [
12+
"jest"
13+
],
14+
"rules": {
15+
"import/no-commonjs": "off",
16+
"spaced-comment": "off",
17+
// TMP
18+
"jsdoc/check-examples": [
19+
"off"
20+
]
21+
}
22+
}

.github/workflows/github_pages.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ jobs:
1111
# checkout this repo
1212
- name: Checkout Repo
1313
uses: actions/checkout@v2
14-
# checkout the private repo containing the action to run
15-
- name: Checkout GitHub Action Repo
16-
uses: actions/checkout@v2
17-
with:
18-
repository: algolia/algoliasearch-crawler-github-actions
19-
ref: v0.7.3
2014
- name: Sleep for 30s
2115
run: sleep 30
2216
- name: Github-pages-MAIN => Algolia crawler creation and recrawl (Push on Main branch)
@@ -25,7 +19,7 @@ jobs:
2519
with:
2620
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
2721
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
28-
crawler-api-base-url: 'https://crawler-dev.algolia.com/api/1/'
22+
crawler-api-base-url: 'https://crawler-dev.algolia.com/api/1'
2923
crawler-name: gpages-github-actions-test-${{ github.ref }}
3024
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
3125
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}

.github/workflows/netlify.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ jobs:
1313
# checkout this repo
1414
- name: Checkout Repo
1515
uses: actions/checkout@v2
16-
# checkout the private repo containing the action to run
17-
- name: Checkout GitHub Action Repo
18-
uses: actions/checkout@v2
19-
with:
20-
repository: algolia/algoliasearch-crawler-github-actions
21-
ref: v0.7.3
2216
- name: Sleep for 30s
2317
run: sleep 30
2418
- name: Netlify-PR => Algolia crawler creation and recrawl on preview (Pull Request)
@@ -28,7 +22,7 @@ jobs:
2822
with:
2923
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
3024
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
31-
crawler-api-base-url: 'https://crawler-dev.algolia.com/api/1/'
25+
crawler-api-base-url: 'https://crawler-dev.algolia.com/api/1'
3226
crawler-name: netlify-github-actions-test-${{ github.ref }}
3327
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
3428
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
@@ -41,7 +35,7 @@ jobs:
4135
with:
4236
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
4337
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
44-
crawler-api-base-url: 'https://crawler-dev.algolia.com/api/1/'
38+
crawler-api-base-url: 'https://crawler.algolia.com/api/1'
4539
crawler-name: netlify-github-actions-test-${{ github.ref }}
4640
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
4741
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
.scannerwork
55
dist/
66
node_modules/
7+
8+
.env
9+
.secrets

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
crawler-api-base-url:
1616
description: 'Crawler API URL'
1717
required: false
18-
default: 'https://crawler.algolia.com/api/1/'
18+
default: 'https://crawler.algolia.com/api/1'
1919
github-token:
2020
description: 'Github token'
2121
required: true
@@ -41,5 +41,5 @@ inputs:
4141
default: false
4242

4343
runs:
44-
using: 'node12'
44+
using: 'node16'
4545
main: 'build/index.js'

0 commit comments

Comments
 (0)