Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOBUG: fix karma test runner failures #74

Merged
merged 1 commit into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 42 additions & 45 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,37 @@ jobs:
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- run: yarn lint
- name: Cancelling workflow due to error
if: ${{ failure() }}
uses: andymckay/cancel-action@0.2

test:
name: Test
runs-on: ubuntu-20.04
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- run: yarn test-ci
Expand All @@ -65,16 +63,15 @@ jobs:
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Setting configEndpoint to true
Expand All @@ -93,18 +90,18 @@ jobs:
role-session-name: parks-reso-admin-sandbox-gh-action
role-skip-session-tagging: true

- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: "/parks-reso-sandbox/s3-bucket-admin-artifacts"
env_variable_name: "S3_BUCKET_ARTIFACTS"
ssm_parameter: '/parks-reso-sandbox/s3-bucket-admin-artifacts'
env_variable_name: 'S3_BUCKET_ARTIFACTS'

- name: Save artifact to S3
env:
s3_bucket: "${{ env.S3_BUCKET_ARTIFACTS }}"
s3_bucket: '${{ env.S3_BUCKET_ARTIFACTS }}'
dir_name: ${{ github.sha }}
run: |
aws s3 sync dist/parks-reso-admin s3://$s3_bucket/$dir_name/

- name: Cancelling workflow due to error
if: ${{ failure() }}
uses: andymckay/cancel-action@0.2
Expand All @@ -115,7 +112,7 @@ jobs:
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- name: Check out the repo
uses: actions/checkout@v2
Expand All @@ -133,28 +130,28 @@ jobs:
role-skip-session-tagging: true

# Admin variables
- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: "/parks-reso-admin/s3-bucket"
env_variable_name: "S3_BUCKET"
- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
ssm_parameter: '/parks-reso-admin/s3-bucket'
env_variable_name: 'S3_BUCKET'
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: "/parks-reso-admin/origin-id"
env_variable_name: "ORIGIN_ID"
ssm_parameter: '/parks-reso-admin/origin-id'
env_variable_name: 'ORIGIN_ID'

# API variables
- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: /parks-reso-api/origin-domain
env_variable_name: "API_GATEWAY_ORIGIN_DOMAIN"
- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
env_variable_name: 'API_GATEWAY_ORIGIN_DOMAIN'
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: /parks-reso-api/origin-id
env_variable_name: "API_GATEWAY_ORIGIN_ID"
- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
env_variable_name: 'API_GATEWAY_ORIGIN_ID'
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: /parks-reso-api/gateway-path-pattern
env_variable_name: "API_GATEWAY_PATH_PATTERN"
env_variable_name: 'API_GATEWAY_PATH_PATTERN'

- name: Setup Terrafrom
uses: hashicorp/setup-terraform@v1
Expand All @@ -179,7 +176,7 @@ jobs:
api_gateway_path_pattern: ${{ env.API_GATEWAY_PATH_PATTERN }}
origin_id_assets: ${{ env.ORIGIN_ID_ASSETS }}
run: terragrunt apply-all --terragrunt-non-interactive

- name: Cancelling workflow due to error
if: ${{ failure() }}
uses: andymckay/cancel-action@0.2
Expand All @@ -191,7 +188,7 @@ jobs:
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -204,14 +201,14 @@ jobs:
role-session-name: parks-reso-admin-sandbox-gh-action
role-skip-session-tagging: true

- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: "/parks-reso-sandbox/s3-bucket-admin-artifacts"
env_variable_name: "S3_BUCKET_ARTIFACTS"
ssm_parameter: '/parks-reso-sandbox/s3-bucket-admin-artifacts'
env_variable_name: 'S3_BUCKET_ARTIFACTS'

- name: Copy from s3 sandbox
env:
s3_bucket: "${{ env.S3_BUCKET_ARTIFACTS }}"
s3_bucket: '${{ env.S3_BUCKET_ARTIFACTS }}'
dir_name: ${{ github.sha }}
run: |
aws s3 sync s3://$s3_bucket/$dir_name/ dist/parks-reso-admin
Expand All @@ -227,14 +224,14 @@ jobs:
role-session-name: parks-reso-admin-dev-gh-action
role-skip-session-tagging: true

- uses: "marvinpinto/action-inject-ssm-secrets@v1.2.1"
- uses: 'marvinpinto/action-inject-ssm-secrets@v1.2.1'
with:
ssm_parameter: "/parks-reso-admin/s3-bucket"
env_variable_name: "S3_BUCKET"
ssm_parameter: '/parks-reso-admin/s3-bucket'
env_variable_name: 'S3_BUCKET'

- name: Deploy to Dev S3
env:
s3_bucket: "${{ env.S3_BUCKET }}-${{ env.TARGET_ENV }}"
s3_bucket: '${{ env.S3_BUCKET }}-${{ env.TARGET_ENV }}'
dir_name: ${{ github.sha }}
run: |
aws s3 sync dist/parks-reso-admin s3://$s3_bucket/$dir_name/
24 changes: 11 additions & 13 deletions .github/workflows/on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,40 @@ jobs:
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- run: yarn lint
- name: Cancelling workflow due to error
if: ${{ failure() }}
uses: andymckay/cancel-action@0.2

test:
name: Test
runs-on: ubuntu-20.04
environment: dev
strategy:
matrix:
node-version: [14.x]
node: ['14']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- run: yarn test-ci
- name: Cancelling workflow due to error
if: ${{ failure() }}
uses: andymckay/cancel-action@0.2
uses: andymckay/cancel-action@0.2
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 10.19.0
nodejs 14.18.2
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@
"@angular/compiler": "~8.2.14",
"@angular/compiler-cli": "~8.2.14",
"@types/arcgis-js-api": "4.6.0",
"@types/jasmine": "2.8.6",
"@types/jasmine": "3.10.2",
"@types/lodash": "4.14.106",
"@types/node": "~10.17.17",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.4.1",
"jasmine-core": "~3.10.1",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.9",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~3.1.1",
"karma-jasmine-html-reporter": "~1.5.2",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "~1.7.0",
"pre-push": "~0.1.1",
"protractor": "~5.4.3",
"puppeteer": "~2.1.1",
"puppeteer": "~12.0.1",
"tree-kill": "~1.2.2",
"ts-node": "7.0.1",
"typescript": "~3.4.5"
Expand Down
Loading