Skip to content

Commit

Permalink
CI scripts to exclude devDependencies from Lambda (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
apgrucza authored Jul 17, 2020
1 parent 748a756 commit 280de0b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- run: ./build.sh okta_native
- run: npm run-script test-ci

- run: npm run-script build-ci okta_native
- run: test -f distributions/okta_native/okta_native.zip
- run: ./build.sh rotate_key_pair
- run: npm run-script build-ci rotate_key_pair
- run: test -f distributions/rotate_key_pair/rotate_key_pair.zip

- run: npm run-script mocha

- uses: actions/upload-artifact@v2
with:
name: packages_${{ matrix.node-version }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
with:
node-version: '10.x'

- name: Run tests
run: npm run-script test-ci

- name: Build okta_native
run: ./build.sh okta_native
run: npm run-script build-ci okta_native
- name: Build rotate_key_pair
run: ./build.sh rotate_key_pair

- name: Run Mocha tests
run: npm run-script mocha
run: npm run-script build-ci rotate_key_pair

- name: Create Release
id: create_release
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"main": "index.js",
"scripts": {
"test": "cd tests && npm install && cd .. && node tests/tests.js",
"mocha": "mocha './mocha/*.js'",
"build": "npm install && cd build && npm install && cd .. && node build/build.js"
"test-ci": "npm ci && mocha './mocha/*.js'",
"build": "npm install && cd build && npm install && cd .. && node build/build.js",
"build-ci": "npm ci --production && cd build && npm ci --production && cd .. && node build/build.js"
},
"author": "Widen Enterprises",
"repository": "github:widen/cloudfront-auth",
Expand Down

0 comments on commit 280de0b

Please sign in to comment.