Mc/ci cd (#570)
* prettier Signed-off-by: microwavedcola1 <microwavedcola@gmail.com> * Fix branch Signed-off-by: microwavedcola1 <microwavedcola@gmail.com> --------- Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
3d02978b9e
commit
d16ee6d35d
|
@ -1,18 +1,18 @@
|
|||
program:
|
||||
- 'programs/**'
|
||||
- 'programs/**'
|
||||
client:
|
||||
- 'ts/client/**'
|
||||
- 'ts/client/**'
|
||||
liquidator:
|
||||
- 'liquidator/**'
|
||||
- 'liquidator/**'
|
||||
keeper:
|
||||
- 'keeper/**'
|
||||
- 'keeper/**'
|
||||
devops:
|
||||
- '*.yml'
|
||||
- '*.yaml'
|
||||
- '*Dockerfile*'
|
||||
- 'fly.toml'
|
||||
- '*.yml'
|
||||
- '*.yaml'
|
||||
- '*Dockerfile*'
|
||||
- 'fly.toml'
|
||||
dependency:
|
||||
- '*.lock'
|
||||
- '*.lock'
|
||||
documentation:
|
||||
- '*.md'
|
||||
- '**/LICENCE'
|
||||
- '*.md'
|
||||
- '**/LICENCE'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Code Review - TypeScript
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request:
|
||||
branches: ['main', 'dev']
|
||||
paths: ['ts/**', 'yarn.lock']
|
||||
push:
|
||||
|
@ -12,58 +12,58 @@ jobs:
|
|||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Format
|
||||
run: yarn format
|
||||
- name: Format
|
||||
run: yarn format
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Run Test
|
||||
run: yarn test
|
||||
- name: Run Test
|
||||
run: yarn test
|
||||
|
||||
sast:
|
||||
name: Security Scan
|
||||
|
@ -78,14 +78,14 @@ jobs:
|
|||
- name: Run semgrep
|
||||
run: semgrep ci --sarif --output=semgrep-results.sarif
|
||||
env:
|
||||
SEMGREP_RULES: p/typescript
|
||||
|
||||
SEMGREP_RULES: p/typescript
|
||||
|
||||
- name: Upload output
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: semgrep-results.sarif
|
||||
|
||||
|
||||
sca:
|
||||
name: Dependency Scan
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -103,7 +103,7 @@ jobs:
|
|||
hide-progress: true
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
|
||||
# Fail the job on critical vulnerabiliies with fix available
|
||||
- name: Fail on critical vulnerabilities
|
||||
uses: aquasecurity/trivy-action@master
|
||||
|
@ -121,24 +121,24 @@ jobs:
|
|||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
|
||||
|
||||
yarn-pass:
|
||||
name: Yarn tests pass
|
||||
needs: ['format', 'lint', 'test']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ok
|
||||
name: Yarn tests pass
|
||||
needs: ['format', 'lint', 'test']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ok
|
||||
|
||||
security-pass:
|
||||
name: Security tests pass
|
||||
needs: ['sca', 'sast']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ok
|
||||
name: Security tests pass
|
||||
needs: ['sca', 'sast']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ok
|
||||
|
||||
all-pass:
|
||||
name: All tests pass 🚀
|
||||
needs: ['yarn-pass', 'security-pass']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ok
|
||||
name: All tests pass 🚀
|
||||
needs: ['yarn-pass', 'security-pass']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ok
|
||||
|
|
|
@ -24,11 +24,11 @@ jobs:
|
|||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Fly
|
||||
uses: superfly/flyctl-actions/setup-flyctl@master
|
||||
|
||||
|
||||
- name: Deploy
|
||||
run: flyctl deploy -c cd/${{ inputs.imageName }}.toml -a ${{ inputs.appName }}
|
||||
run: flyctl deploy -c cd/${{ inputs.imageName }}.toml -a ${{ inputs.appName }}
|
||||
|
|
|
@ -21,11 +21,11 @@ jobs:
|
|||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login
|
||||
env:
|
||||
env:
|
||||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
|
||||
run: heroku container:login
|
||||
|
||||
|
@ -37,4 +37,4 @@ jobs:
|
|||
- name: Release
|
||||
env:
|
||||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
|
||||
run: heroku container:release ${{ inputs.imageName }} -a ${{ inputs.appName }}
|
||||
run: heroku container:release ${{ inputs.imageName }} -a ${{ inputs.appName }}
|
||||
|
|
|
@ -2,7 +2,7 @@ name: Publish Docker Image to GCR
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [dev, main]
|
||||
branches: [deploy]
|
||||
paths:
|
||||
[
|
||||
'.github/ci-docker-publish.yml',
|
||||
|
|
|
@ -2,7 +2,7 @@ name: Build Docs
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, dev ]
|
||||
branches: [main, dev]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
|
@ -36,4 +36,4 @@ jobs:
|
|||
uses: JamesIves/github-pages-deploy-action@4.1.5
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: docs
|
||||
folder: docs
|
||||
|
|
|
@ -12,6 +12,6 @@ jobs:
|
|||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
|
|
@ -2,7 +2,7 @@ name: Verifiable Build
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "program-v*"
|
||||
- 'program-v*'
|
||||
|
||||
env:
|
||||
APP_NAME: mango_v4
|
||||
|
|
Loading…
Reference in New Issue