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

[PROD-2538]: Add pipeline for schema validation #8

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6be32b4
[PROD-2538]: set up typescript
harjotsinghgill Feb 17, 2025
a7fb3e6
[PROD-2538]: configure playwright
harjotsinghgill Feb 17, 2025
1ec39c8
[PROD-2538]: update playwright config
harjotsinghgill Feb 18, 2025
d3ecf3f
[PROD-2538]: add test scenarios and data
harjotsinghgill Feb 18, 2025
d7f0983
[PROD-2538]: add playrisght script
harjotsinghgill Feb 18, 2025
60ff6ba
[PROD-2538]: add playwright.yaml
harjotsinghgill Feb 18, 2025
9b549bd
[PROD-2538]: update workflows
harjotsinghgill Feb 18, 2025
71e8d57
[PROD-2538]: remove unused templates
harjotsinghgill Feb 18, 2025
b6342eb
[PROD-2538]: update workflow file
harjotsinghgill Feb 18, 2025
b0fadd7
[PROD-2538]: update workflow file
harjotsinghgill Feb 18, 2025
d32b10c
[PROD-2538]: update workflow file
harjotsinghgill Feb 18, 2025
7b6fead
[PROD-2538]: remove playwright implementation
harjotsinghgill Feb 18, 2025
bdd0f5a
[PROD-2538]: add jest
harjotsinghgill Feb 18, 2025
d5ee5af
[PROD-2538]: update test script and workflows
harjotsinghgill Feb 18, 2025
3aa7708
[PROD-2538]: update workflow
harjotsinghgill Feb 18, 2025
2e929c4
[PROD-2538]: update workflow file
harjotsinghgill Feb 18, 2025
4f4a213
[PROD-2538]: update workflow
harjotsinghgill Feb 18, 2025
12199d2
[PROD-2538]: add data generation tool
harjotsinghgill Feb 19, 2025
07aaf25
[PROD-2538]: update test data
harjotsinghgill Feb 19, 2025
13471c0
[PROD-2538]: add and update workflows
harjotsinghgill Feb 19, 2025
ed2051a
[PROD-2538]: change workflow name
harjotsinghgill Feb 19, 2025
ba0d3a9
[PROD-2538]: update compassID for metric source
harjotsinghgill Feb 21, 2025
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
54 changes: 0 additions & 54 deletions .github/workflows/actions-template.yaml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/compass-status.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: compass

on:
workflow_call:
inputs:
metricValue:
type: number
required: true
compassId:
type: string
required: true

jobs:
compass:
runs-on: ubuntu-latest
steps:
- name: Send Success to Compass
env:
USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
USER_API_KEY: ${{ secrets.JIRA_API_TOKEN }}
METRIC_VALUE: ${{ inputs.metricValue }}
COMPASS_ID: ${{ inputs.compassId }}
run: |
curl --request POST \
--url https://redbelly.atlassian.net/gateway/api/compass/v1/metrics \
--user "$USER_EMAIL:$USER_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"metricSourceId\": \"$COMPASS_ID\",
\"value\": $METRIC_VALUE,
\"timestamp\": \"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\"
}"
26 changes: 26 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: receptor-schema:dev
on:
push:
branches:
- main
workflow_dispatch:
jobs:
validate:
uses: ./.github/workflows/validation-test.yaml
secrets: inherit
compass-success:
needs: [validate]
if: success()
uses: ./.github/workflows/compass-status.yaml
with:
compassId: ari:cloud:compass:1794ff3d-579e-455b-ae19-07f3651d7bb2:metric-source/8f784f5d-165e-48a8-800f-432089cd8105/cdf96920-6204-42d6-9e79-1f8618d3e851
metricValue: 1
secrets: inherit
compass-failure:
needs: [validate]
if: failure()
uses: ./.github/workflows/compass-status.yaml
with:
compassId: ari:cloud:compass:1794ff3d-579e-455b-ae19-07f3651d7bb2:metric-source/8f784f5d-165e-48a8-800f-432089cd8105/cdf96920-6204-42d6-9e79-1f8618d3e851
metricValue: 0
secrets: inherit
10 changes: 10 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: receptor-schema:pr
on:
pull_request:
types: [reopened, opened, synchronize, edited]
workflow_dispatch:
jobs:
validate:
uses: ./.github/workflows/validation-test.yaml
secrets: inherit

79 changes: 0 additions & 79 deletions .github/workflows/releases.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/validation-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Validation Tests
on: workflow_call
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-22.04
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run validation tests
run: npm test
4 changes: 4 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node"
};
Loading