Skip to content

Commit aa15dd2

Browse files
authored
Remove circle ci (#13)
* removes circle ci * adds github actions
1 parent c53d051 commit aa15dd2

File tree

4 files changed

+43
-86
lines changed

4 files changed

+43
-86
lines changed

.circleci/config.yml

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

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["*"]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [18, 20]
17+
mongodb-version: [6.0, 7.0]
18+
19+
steps:
20+
- name: Git checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- name: Start MongoDB
29+
uses: supercharge/[email protected]
30+
with:
31+
mongodb-version: ${{ matrix.mongodb-version }}
32+
33+
- run: npm install
34+
35+
- run: npm test
36+
env:
37+
CI: true

index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,12 @@ module.exports = {
133133
data[key] = data[key].join(',');
134134
}
135135

136-
data[key] = typeof data[key] === 'string' ? data[key]
136+
data[key] = typeof data[key] === 'string'
137+
? data[key]
137138
: JSON.stringify(data[key]);
138139
},
139140
async getFirstSheet (spreadsheetId) {
140-
const spreadsheet = await self.sheets.spreadsheets.get({
141-
spreadsheetId: spreadsheetId
142-
});
141+
const spreadsheet = await self.sheets.spreadsheets.get({ spreadsheetId });
143142
if (!spreadsheet || !has(spreadsheet, [
144143
'data', 'sheets', 0, 'properties', 'title'
145144
])) {
@@ -196,8 +195,7 @@ module.exports = {
196195
credentialsFile = `${confFolder}/credentials.json`;
197196
}
198197

199-
process.env.GOOGLE_APPLICATION_CREDENTIALS = process.env.GOOGLE_APPLICATION_CREDENTIALS ||
200-
credentialsFile;
198+
process.env.GOOGLE_APPLICATION_CREDENTIALS ||= credentialsFile;
201199

202200
if (
203201
process.env.GOOGLE_APPLICATION_CREDENTIALS &&

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,11 @@
1616
"author": "Apostrophe Technologies",
1717
"license": "MIT",
1818
"devDependencies": {
19-
"eslint": "^7.9.0",
20-
"eslint-config-apostrophe": "^3.4.0",
21-
"eslint-config-standard": "^14.1.1",
22-
"eslint-plugin-import": "^2.22.0",
23-
"eslint-plugin-node": "^11.1.0",
24-
"eslint-plugin-promise": "^4.2.1",
25-
"eslint-plugin-standard": "^4.0.1"
19+
"eslint-config-apostrophe": "^5.0.0"
2620
},
2721
"dependencies": {
2822
"googleapis": "^88.2.0",
2923
"klona": "^2.0.4",
3024
"lodash.has": "^4.5.2"
3125
}
32-
}
26+
}

0 commit comments

Comments
 (0)