<commit_before>name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
env:
 # Stop wasting time caching packages
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
  # Disable sending usage data to Microsoft
  DOTNET_CLI_TELEMETRY_OPTOUT: true
  # Don't show a logo on first run of CLI
  DOTNET_NOLOGO: true
  # GitHub Packages Feed settings
  GITHUB_FEED: https://nuget.pkg.github.com/
  GITHUB_USER: iancooper
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Build
        run: dotnet build --configuration Release --no-restore 
      - uses: actions/upload-artifact@v2
        with:
          name: dotnet artifacts
          path: |
            ./
            src/
            tests/
  
  test:

    runs-on: ubuntu-latest
    needs: [build]

    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Core Tests
        run: dotnet test tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj -c Release --no-restore --logger "console;verbosity=normal" --blame -v n

  package:
    
    runs-on: ubuntu-latest
    needs: [test]
    
    steps:
      - uses: actions/download-artifact@v2
        with:
          name: dotnet artifacts
      - uses: actions/upload-artifact@v2
        with:
          name: nuget packages
          path: "**/*.nupkg"
      
  prerelease:
    runs-on: ubuntu-latest
    needs: [package]
    
    steps:
      - uses: actions/download-artifact@v2
        with:
          name: nuget packages
      - name: Push to GitHub Feed
        run: |
          for f in **/*.nupkg
          do
            curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED$GITHUB_REPOSITORY
          done
    
  redis-ci:
    runs-on: ubuntu-latest
    needs: [test]
    
    services:
      redis:  
        image: redis:latest
        ports:
        - 6379:6379
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5             
      
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Redis Transport Tests
        run: dotnet test ./tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n
  
  rabbitmq-ci:
    runs-on: ubuntu-latest
    needs: [test]

    services:
      rabbitmq:
        image: brightercommand/rabbitmq:3.8-management-delay
        ports:
        - 5672:5672 
        # needed because the rabbitmq container does not provide a healthcheck
        options: >-
          --health-cmd "rabbitmqctl node_health_check"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: RMQ Transport Tests
        run: dotnet test ./tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n

  postgres-ci:
    runs-on: ubuntu-latest
    needs: [test]
  
    services:
      postgres:
        image: postgres
        ports: 
          - 5432:5432
        env:
          POSTGRES_PASSWORD: password
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Postgres Tests
        run: dotnet test ./tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n
        
  sqlserver-ci:
    runs-on: ubuntu-latest
    needs: [test]
  
    services:
      postgres:
        image: microsoft/mssql-server-linux
        ports: 
          - 1433:1433
        env:
          ACCEPT_EULA: Y
          SA_PASSWORD: <PASSWORD>!
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: MSSQL Tests
        run: dotnet test ./tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n
        
<commit_msg>Update ci.yml<commit_after>name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
env:
 # Stop wasting time caching packages
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
  # Disable sending usage data to Microsoft
  DOTNET_CLI_TELEMETRY_OPTOUT: true
  # Don't show a logo on first run of CLI
  DOTNET_NOLOGO: true
  # GitHub Packages Feed settings
  GITHUB_FEED: https://nuget.pkg.github.com/
  GITHUB_USER: iancooper
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Build
        run: dotnet build --configuration Release --no-restore 
      - uses: actions/upload-artifact@v2
        with:
          name: dotnet artifacts
          path: |
            ./
            src/
            tests/
  
  test:

    runs-on: ubuntu-latest
    needs: [build]

    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Core Tests
        run: dotnet test tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj -c Release --no-restore --logger "console;verbosity=normal" --blame -v n

  package:
    
    runs-on: ubuntu-latest
    needs: [test]
    
    steps:
      - uses: actions/download-artifact@v2
        with:
          name: dotnet artifacts
      - uses: actions/upload-artifact@v2
        with:
          name: nuget packages
          path: "**/*.nupkg"
      
  prerelease:
    runs-on: ubuntu-latest
    needs: [package]
    
    steps:
      - uses: actions/download-artifact@v2
        with:
          name: nuget packages
      - name: Push to GitHub Feed
        run: |
          for f in **/*.nupkg
          do
            curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED$GITHUB_REPOSITORY
          done
    
  redis-ci:
    runs-on: ubuntu-latest
    needs: [test]
    
    services:
      redis:  
        image: redis:latest
        ports:
        - 6379:6379
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5             
      
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Redis Transport Tests
        run: dotnet test ./tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n
  
  rabbitmq-ci:
    runs-on: ubuntu-latest
    needs: [test]

    services:
      rabbitmq:
        image: brightercommand/rabbitmq:3.8-management-delay
        ports:
        - 5672:5672 
        # needed because the rabbitmq container does not provide a healthcheck
        options: >-
          --health-cmd "rabbitmqctl node_health_check"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: RMQ Transport Tests
        run: dotnet test ./tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n

  postgres-ci:
    runs-on: ubuntu-latest
    needs: [test]
  
    services:
      postgres:
        image: postgres
        ports: 
          - 5432:5432
        env:
          POSTGRES_PASSWORD: password
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: Postgres Tests
        run: dotnet test ./tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n
        
  sqlserver-ci:
    runs-on: ubuntu-latest
    needs: [test]
  
    services:
      postgres:
        image: microsoft/mssql-server-linux
        ports: 
          - 1433:1433
        env:
          ACCEPT_EULA: Y
          SA_PASSWORD: <PASSWORD>!
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: MSSQL Tests
        run: dotnet test ./tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n
        
  dynamo-ci:
    runs-on: ubuntu-latest
    needs: [test]
  
    services:
      dynamo:
        image: dwmkerr/dynamodb
        ports: 
          - 8000:8000
        options: >-
         -inMemory
      
    steps:
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 2.1.x
      - name: Install dependencies
        run: dotnet restore
      - name: DynamoDB Tests
        run: dotnet test ./tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj --configuration Release --logger "console;verbosity=normal" --blame -v n

{'fraction_non_alphanumeric': 0.09735140402161396, 'fraction_numerical': 0.014173088847550712, 'mean_word_length': 1.7766847024102312, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '83552', 'n_tokens_mistral': 3757, 'n_tokens_neox': 3560, 'n_words': 850}