Skip to content

Commit

Permalink
Reconfigure directory layout and update github actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bmquinn committed Jun 21, 2023
1 parent 78b8397 commit d6cc2fb
Show file tree
Hide file tree
Showing 128 changed files with 61 additions and 54 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/build.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/test-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run NodeJS Tests
on:
push:
paths:
- ".github/workflows/test_node.yml"
- "node/**"
workflow_dispatch:
defaults:
run:
working-directory: ./node
jobs:
test:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ci
AWS_SECRET_ACCESS_KEY: ci
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
- run: npm ci
- name: Check code style
run: npm run lint && npm run prettier
- name: Run tests
run: npm run test:coverage
- name: Validate OpenAPI spec
run: npm run validate-spec
25 changes: 25 additions & 0 deletions .github/workflows/validate-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validate Template
on:
push:
paths:
- ".github/workflows/validate-template.yml"
- "./template.yml"
workflow_dispatch:
jobs:
validate-template:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment: test
steps:
- uses: aws-actions/setup-sam@v1
- name: sam fix https://github.com/aws/aws-sam-cli/issues/4527
run: $(dirname $(readlink $(which sam)))/pip install --force-reinstall "cryptography==38.0.4"
- uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: arn:aws:iam::${{ secrets.AwsAccount }}:role/github-actions-role
aws-region: us-east-1
- uses: actions/checkout@v3
- name: Validate template
run: sam build && sam validate
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions package-lock.json → node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json → node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prettier:fix": "prettier -cw src test",
"test": "mocha",
"test:coverage": "nyc npm test",
"validate-spec": "openapi-generator-cli validate -i ./docs/docs/spec/openapi.yaml"
"validate-spec": "openapi-generator-cli validate -i ../docs/docs/spec/openapi.yaml"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.5.2",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/package-lock.json → node/src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description: >
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
CodeUri: ./src
CodeUri: ./node/src
Runtime: nodejs16.x
Architectures:
- x86_64
Expand Down

0 comments on commit d6cc2fb

Please sign in to comment.