Skip to content

ci: add continuous integration #23

ci: add continuous integration

ci: add continuous integration #23

Workflow file for this run

name: continuous integration
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
integration:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout sources
uses: actions/checkout@v4
# - name: Run megalinter
# uses: oxsecurity/megalinter@688bc7466d7ab4faa83d614c2e6f9acf42b674dc # v7.8.0
# env:
# DISABLE_LINTERS: SPELL_CSPELL,REPOSITORY_CHECKOV
# EDITORCONFIG_EDITORCONFIG_CHECKER_ARGUMENTS: -disable-end-of-line
- name: Dotnet informations
run: dotnet --info
- name: Restore dotnet tools
run: dotnet tool restore
- name: dotnet build
run: dotnet build
- name: Test for outdated dependencies
run: dotnet outdated --fail-on-updates
- name: SonarCloud configuration
run: dotnet sonarscanner begin /o:arwynfr /k:ArwynFr_dotnet-integration-testing /d:sonar.host.url=https://sonarcloud.io
env:
SONAR_TOKEN: ${{ secrets.sonar_token }}
- name: Run automated tests
run: dotnet test --settings runsettings.xml --results-directory TestResults
working-directory: src/ArwynFr.IntegrationTesting.Tests
- name: SonarCloud analyze
run: dotnet sonarscanner end
- name: Continuous integration
run: gh pr merge --squash --auto
env:
GH_TOKEN: ${{ github.token }}