Skip to content

chore: adjusts docker image configuration #134

chore: adjusts docker image configuration

chore: adjusts docker image configuration #134

name: Lint tests and sonar
on:
push:
branches:
- 'master'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 8.17
cache: 'npm'
- name: Run ci (install)
run: npm ci
- name: Run lint
run: npm run lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1

Check failure on line 41 in .github/workflows/lint_tests_and_sonar.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/lint_tests_and_sonar.yml

Invalid workflow file

You have an error in your yaml syntax on line 41
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
mask-aws-account-id: "no"
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Run tests
run: make test-ci
- name: Upload Test Coverage
uses: actions/upload-artifact@v3
with:
name: superbowleto-coverage
path: |
coverage/
sonar:
name: Sonar
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download Coverage
uses: actions/download-artifact@v3
with:
name: superbowleto-coverage
path: |
coverage/
- name: Override Coverage Source Path for Sonar
run: |
sed -i 's/\/superbowleto\/src\//src\//g' coverage/lcov.info
- name: Run Sonar
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}