Skip to content

Commit d11a1f1

Browse files
committed
Update to 0.16.1, remove need for username and token
1 parent d2216f1 commit d11a1f1

12 files changed

Lines changed: 35 additions & 117 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ jobs:
6161
with:
6262
configuration_file: example/postgres-to-csv.yaml
6363
base_folder: insta-integration-test
64-
data_caterer_user: ${{ secrets.DATA_CATERER_USER }}
65-
data_caterer_token: ${{ secrets.DATA_CATERER_TOKEN }}
6664

6765
- name: Print Output
6866
id: output

README.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ Problems it can help with:
1414

1515
## Usage
1616

17-
### Get Token
18-
19-
To use this GitHub Action, you need to get a username and token from
20-
[data-catering](https://data.catering/latest/get-started/quick-start/#get-token).
21-
2217
### CLI
2318

2419
1. Install via `npm install -g insta-integration`
@@ -47,8 +42,7 @@ To use this GitHub Action, you need to get a username and token from
4742
- name: Run integration tests
4843
uses: data-catering/insta-integration@v3
4944
with:
50-
data_caterer_user: ${{ secrets.DATA_CATERER_USER }}
51-
data_caterer_token: ${{ secrets.DATA_CATERER_TOKEN }}
45+
data_caterer_version: 0.16.1
5246
```
5347
5448
1. Create YAML file `insta-integration.yaml` to define your integration tests
@@ -129,7 +123,7 @@ The following data sources are available to generate/validate data.
129123
<summary>Click here</summary>
130124

131125
| Data Source Type | Data Source | Support |
132-
| ---------------- |------------------------------------| ------- |
126+
| ---------------- | ---------------------------------- | ------- |
133127
| Cloud Storage | AWS S3 | ✅ |
134128
| Cloud Storage | Azure Blob Storage | ✅ |
135129
| Cloud Storage | GCP Cloud Storage | ✅ |
@@ -267,14 +261,12 @@ run:
267261
Optional configurations to alter the files and folders used by the GitHub Action
268262
can be found below.
269263

270-
| Name | Description | Default |
271-
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
272-
| configuration_file | File path to configuration file | `insta-integration.yaml` |
273-
| insta_infra_folder | Folder path to insta-infra ([this repository](https://github.com/data-catering/insta-infra)) | `${HOME}/.insta-integration/insta-infra` |
274-
| base_folder | Folder path to use for execution files | `${HOME}/.insta-integration` |
275-
| data_caterer_version | Version of data-caterer Docker image | `0.15.2` |
276-
| data_caterer_user | User for data-caterer. If you don't have one yet, [create one here](https://data.catering/latest/get-started/quick-start/#get-token) | <empty> |
277-
| data_caterer_token | Token for data-caterer. If you don't have one yet, [create one here](https://data.catering/latest/get-started/quick-start/#get-token) | <empty> |
264+
| Name | Description | Default |
265+
| -------------------- | -------------------------------------------------------------------------------------------- | ---------------------------------------- |
266+
| configuration_file | File path to configuration file | `insta-integration.yaml` |
267+
| insta_infra_folder | Folder path to insta-infra ([this repository](https://github.com/data-catering/insta-infra)) | `${HOME}/.insta-integration/insta-infra` |
268+
| base_folder | Folder path to use for execution files | `${HOME}/.insta-integration` |
269+
| data_caterer_version | Version of data-caterer Docker image | `0.16.1` |
278270

279271
To use these configurations, alter your
280272
`.github/workflows/integration-test.yaml`.
@@ -296,9 +288,7 @@ jobs:
296288
configuration_file: my/custom/folder/insta-integration.yaml
297289
insta_infra_folder: insta-infra/folder
298290
base_folder: execution/folder
299-
data_caterer_version: 0.15.2
300-
data_caterer_user: ${{ secrets.DATA_CATERER_USER }}
301-
data_caterer_token: ${{ secrets.DATA_CATERER_TOKEN }}
291+
data_caterer_version: 0.16.1
302292
```
303293

304294
#### Output
@@ -352,7 +342,8 @@ ajv compile --spec=draft2019 -s schema/insta-integration-config-latest.json
352342

353343
#### Validate YAML file
354344

355-
You can run `npm run validate-yaml` and it will validate all the YAML files under the `examples` directory.
345+
You can run `npm run validate-yaml` and it will validate all the YAML files
346+
under the `examples` directory.
356347

357348
Otherwise, if you have a different pathway, validate via `ajv`:
358349

__tests__/main.test.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('getDataCatererVersion', () => {
3636
})
3737

3838
it('returns the default data caterer version if not provided', () => {
39-
expect(getDataCatererVersion('')).toBe('0.15.2')
39+
expect(getDataCatererVersion('')).toBe('0.16.1')
4040
})
4141
})
4242

@@ -47,8 +47,6 @@ describe('getConfiguration', () => {
4747
process.env.INSTA_INFRA_FOLDER = '/infra'
4848
process.env.BASE_FOLDER = '/base'
4949
process.env.DATA_CATERER_VERSION = '1.0.0'
50-
process.env.DATA_CATERER_USER = 'user'
51-
process.env.DATA_CATERER_TOKEN = 'token'
5250
})
5351

5452
it('returns the configuration from environment variables', () => {
@@ -57,9 +55,7 @@ describe('getConfiguration', () => {
5755
applicationConfig: 'config.json',
5856
instaInfraFolder: '/infra',
5957
baseFolder: '/base',
60-
dataCatererVersion: '1.0.0',
61-
dataCatererUser: 'user',
62-
dataCatererToken: 'token'
58+
dataCatererVersion: '1.0.0'
6359
})
6460
})
6561

@@ -69,9 +65,7 @@ describe('getConfiguration', () => {
6965
configuration_file: 'input_config.json',
7066
insta_infra_folder: '/input_infra',
7167
base_folder: '/input_base',
72-
data_caterer_version: '2.0.0',
73-
data_caterer_user: 'input_user',
74-
data_caterer_token: 'input_token'
68+
data_caterer_version: '2.0.0'
7569
}
7670
return inputs[name] || ''
7771
})
@@ -80,9 +74,7 @@ describe('getConfiguration', () => {
8074
applicationConfig: 'input_config.json',
8175
instaInfraFolder: '/input_infra',
8276
baseFolder: '/input_base',
83-
dataCatererVersion: '2.0.0',
84-
dataCatererUser: 'input_user',
85-
dataCatererToken: 'input_token'
77+
dataCatererVersion: '2.0.0'
8678
})
8779
})
8880
})

action.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ inputs:
1818
default: '/home/runner/work'
1919
data_caterer_version:
2020
description: 'Version of data-caterer Docker image'
21-
default: '0.15.2'
22-
data_caterer_user:
23-
description: 'User for data-caterer'
24-
default: ''
25-
data_caterer_token:
26-
description: 'Token for data-caterer'
27-
default: ''
21+
default: '0.16.1'
2822

2923
# Define your outputs here.
3024
outputs:
@@ -77,5 +71,3 @@ runs:
7771
'${{ github.workspace }}/${{ inputs.insta_infra_folder }}'
7872
BASE_FOLDER: '${{ github.workspace }}'
7973
DATA_CATERER_VERSION: '${{ inputs.data_caterer_version }}'
80-
DATA_CATERER_USER: '${{ inputs.data_caterer_user }}'
81-
DATA_CATERER_TOKEN: '${{ inputs.data_caterer_token }}'

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 5 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "insta-integration",
33
"description": "insta-integration GitHub Action",
4-
"version": "1.1.3",
4+
"version": "1.1.4",
55
"author": "data-catering",
66
"private": false,
77
"bin": {

schema/insta-integration-config-latest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,10 @@
463463
"type": "string",
464464
"description": "Uses the pattern: '<name of generation>.<field name>' or '<name of data source>.<name of generation>.<field name>'",
465465
"pattern": "^[^|]+\\|\\|[^|]+(\\|\\|[^|]+)?$",
466-
"examples": ["postgres_transaction||account_number", "http||POST/pets||body.id"]
466+
"examples": [
467+
"postgres_transaction||account_number",
468+
"http||POST/pets||body.id"
469+
]
467470
}
468471
}
469472
},

src/cli.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { program } = require('commander')
44
const { run } = require('./main')
55

66
program
7-
.version('1.1.3')
7+
.version('1.1.4')
88
.description(
99
'insta-integration CLI - Simple integration testing for any application or job'
1010
)
@@ -21,10 +21,8 @@ program
2121
.option(
2222
'-d, --data-caterer-version <version>',
2323
'Version of data-caterer Docker image',
24-
'0.15.2'
24+
'0.16.1'
2525
)
26-
.option('-u, --data-caterer-user <user>', 'User for data-caterer', '')
27-
.option('-t, --data-caterer-token <token>', 'Token for data-caterer', '')
2826
.option(
2927
'-i, --insta-infra-folder <folder>',
3028
'Folder pathway to insta-infra repository',
@@ -43,12 +41,6 @@ program
4341
if (options.dataCatererVersion) {
4442
process.env.DATA_CATERER_VERSION = options.dataCatererVersion
4543
}
46-
if (options.dataCatererUser) {
47-
process.env.DATA_CATERER_USER = options.dataCatererUser
48-
}
49-
if (options.dataCatererToken) {
50-
process.env.DATA_CATERER_TOKEN = options.dataCatererToken
51-
}
5244
run()
5345
})
5446

0 commit comments

Comments
 (0)