chore(sonar): reduce number of files at root dir and add version info… #566
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Delivery | |
on: | |
push: | |
branches: [trunk, beta] | |
jobs: | |
common-ci: | |
uses: ./.github/workflows/common_ci.yml | |
secrets: inherit | |
with: | |
type_pipeline: 'continuous_delivery' | |
test-mutation: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v3 | |
- name: Get specific changed files | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v43 | |
with: | |
files: src | |
- name: Load secrets from 1password | |
uses: 1password/load-secrets-action@v2 | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
STRYKER_DASHBOARD_API_KEY: op://CI-CD/stryker-mutator/API_KEY | |
- name: Run mutation test | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: make test-mutation | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ env.STRYKER_DASHBOARD_API_KEY }} | |
release: | |
needs: [common-ci] | |
concurrency: create_release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Project checkout | |
uses: actions/checkout@v3 | |
- name: Node.js Setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Installation of Node.js dependencies | |
run: npm ci | |
- name: Install 1Password CLI | |
uses: 1password/install-cli-action@v1 | |
with: | |
version: 2.18.0 | |
- name: Generate and fill .env file with secrets | |
run: op read op://CI-CD/moesif/APPLICATION_ID | sed 's/^/MOESIF_APPLICATION_ID=/' >> .env | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
- name: Load secrets from 1password | |
uses: 1password/load-secrets-action@v2 | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
GH_TOKEN: op://CI-CD/GitHub/GH_TOKEN | |
NPM_TOKEN: op://CI-CD/npm/NPM_TOKEN | |
DOCKER_REGISTRY_USER: op://CI-CD/docker/username | |
DOCKER_REGISTRY_PASSWORD: op://CI-CD/docker/password | |
PACT_BROKER_TOKEN: op://CI-CD/pactflow/PACT_BROKER_TOKEN | |
- name: Release on NPM and Docker | |
run: npx [email protected] | |
env: | |
GITHUB_TOKEN: ${{ env.GH_TOKEN }} | |
NPM_TOKEN: ${{ env.NPM_TOKEN }} | |
DOCKER_REGISTRY_USER: ${{ env.DOCKER_REGISTRY_USER }} | |
DOCKER_REGISTRY_PASSWORD: ${{ env.DOCKER_REGISTRY_PASSWORD }} | |
- run: docker-compose build test-contract | |
- name: Run contract test | |
run: make test-contract | |
env: | |
PACT_BROKER_TOKEN: ${{ env.PACT_BROKER_TOKEN }} |