Skip to content

Commit

Permalink
Merge pull request #21 from guidesmiths/feat/improve-github-action
Browse files Browse the repository at this point in the history
Feat: improve GitHub action
  • Loading branch information
Íñigo Marquínez committed Oct 5, 2021
2 parents 234a21c + 0492449 commit 14609a5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 26 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These owners will be the default owners for everything in
# the repo.
* @inigomarquinez @robertoHeCi
11 changes: 4 additions & 7 deletions .github/workflows/publish-plugin.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: Publish plugin
on:
push:
branches: [ main ]
release:
types: [ published ]
jobs:
publish-npm:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Build on Node.js ${{ matrix.node-version }}
- name: Build on Node.js using 14.17.6
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- name: Run npm install ci
run: npm ci --only=production
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.6
30 changes: 11 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ A typical, simple configuration looks like this:

```json
{
region: 'us-east-1',
credentials: {
secretAccessKey: 'test',
accessKeyId: 'test'
"region": "us-east-1",
"credentials": {
"secretAccessKey": "test",
"accessKeyId": "test"
}
}
```
Expand All @@ -35,13 +35,6 @@ const api = await start({ config }); // configuration similar to the one above

As the AWS API has dozens of commands, intead of having one wrapper for each of them, the component exposes one single command `commandExecutor` that can be used to call any of the commands exposed by the api:

```js
const res = await api.commandExecutor({
commandParams: { <params of the method> },
commandName: <name of the method>
});
```

For example, to list all the objects in a specific bucket:

```js
Expand All @@ -62,14 +55,7 @@ In the future, this component will also expose some custom commands not supporte

### How to test it

Set up / tear down local resources running:

```bash
npm run infra:up
npm run infra:down
```

Once resources are up you can test the component running one of this commands:
You can test the whole test suite running one of these commands:

```bash
# all tests will be executed once
Expand All @@ -79,3 +65,9 @@ npm run test
npm run test:watch
```

In case that you want to just execute a certain test case, you can also use these scripts to up / tear down the infra.

```bash
npm run infra:up
npm run infra:down
```

0 comments on commit 14609a5

Please sign in to comment.