Remove completed field and add sent to provider at #2373
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: Run .NET tests and Lint Dockerfile | |
on: | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
jobs: | |
test_dot_net: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- uses: DfE-Digital/keyvault-yaml-secret@v1 | |
id: keyvault-yaml-secret | |
with: | |
keyvault: ${{ secrets.KEY_VAULT}} | |
secret: INFRA-KEYS | |
key: SLACK-WEBHOOK | |
- name: set-up-environment | |
uses: DFE-Digital/github-actions/set-up-environment@master | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0' | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore /warnaserror | |
- name: Spin Up Stack | |
run: docker-compose up -d | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
- name: Lint Dockerfile | |
uses: brpaz/hadolint-action@master | |
with: | |
dockerfile: "Dockerfile" | |
- name: Slack Notification | |
if: failure() && github.ref == 'refs/heads/master' | |
uses: rtCamp/action-slack-notify@master | |
env: | |
SLACK_COLOR: ${{env.SLACK_FAILURE }} | |
SLACK_MESSAGE: Pipeline Failure carrying out job ${{github.job}} | |
SLACK_TITLE: 'Failure: ${{ github.workflow }}' | |
SLACK_WEBHOOK: ${{ steps.keyvault-yaml-secret.outputs.SLACK-WEBHOOK }} |