Skip to content

Fix bug in DDL SQL #214

Fix bug in DDL SQL

Fix bug in DDL SQL #214

Workflow file for this run

name: Test Neo-Transposer
on: [push]
env:
NT_DB_HOST: host.docker.internal
NT_DB_USER: root
NT_DB_PASSWORD: root
NT_DB_DATABASE: nt_only_songs
NT_DB_DATABASE_INTEGRATION: nt_empty_tables
NT_DEBUG: 1
NT_PROFILER: 0
NT_ADMIN_USERNAME: unused
NT_ADMIN_PASSWORD: unused
NT_ANALYTICS_ID: UA-xxxxxxxx-1
NT_MAXMIND_LICENSE_KEY: ${{ secrets.NT_MAXMIND_LICENSE_KEY }}
REGISTRY: ghcr.io
jobs:
test-and-distribute:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 📦 Build the DEV Docker image
run: make build-dev
- name: ⚙ Run fixture containers
run: |
make start-db-for-test
make start
- name: 🧪 Unit & integration tests, functional test
run: make test
- name: 🧪 Acceptance tests
run: make test-acceptance
- name: 📝 Get tests' outputs
if: always()
run: make get-test-outputs dest=.
- name: Upload tests' outputs as artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: Codeception-outputs
path: _output
- name: 📦 Build the PROD Docker image
run: make build-prod
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for the registry
id: meta
uses: docker/metadata-action@v4
with:
images: transposer:prod
- name: 🚀 Upload to GitHub's container repository
run: |
docker tag transposer:prod ${{ env.REGISTRY }}/${{ github.actor }}/${{ github.repository }}:${{ github.sha }}-prod
docker push ${{ env.REGISTRY }}/${{ github.actor }}/${{ github.repository }}:${{ github.sha }}-prod
- name: 🕵️ Run Trivy vulnerability scanner against the Prod image
uses: anandg112/trivy-action@feat/add-skip-dirs-option
with:
image-ref: ${{ env.REGISTRY }}/${{ github.actor }}/${{ github.repository }}:${{ github.sha }}-prod
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
- name: 🕵️ Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' ./_output/coverage.xml
# - name: 🕵️ SonarCloud code quality scan
# uses: SonarSource/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}