<commit_before>trigger: ["master"]
pr: ["master"]


jobs:
- template: _build/azure-pipelines-template.yml
  parameters:
    name: macOS_sqlite
    displayName: macOS SQLite
    vmImage: macOS-10.15
    variables:
      BACKEND: sqlite
      SQLITE_DATABASE_URL: /tmp/test.db

- template: _build/azure-pipelines-template.yml
  parameters:
    name: macOS_postgres
    displayName: macOS PostgreSQL
    vmImage: macOS-10.15
    variables:
      BACKEND: postgres
      PG_DATABASE_URL: postgres://postgres@localhost/
      PG_EXAMPLE_DATABASE_URL: postgres://postgres@localhost/diesel_example
    setup:
      - script: |
          brew update
          brew uninstall --ignore-dependencies libpq
          brew install postgres
          /usr/local/Cellar/postgresql/12.2/bin/initdb --locale=C -E UTF-8 /usr/local/var/postgres
          brew services start postgresql
          sleep 3
          /usr/local/opt/postgres/bin/createuser -s postgres
        displayName: Install postgresql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: macOS_mysql
    displayName: macOS MySQL
    vmImage: macOS-10.15
    variables:
      BACKEND: mysql
      MYSQL_DATABASE_URL: mysql://root@localhost/diesel_test
      MYSQL_EXAMPLE_DATABASE_URL: mysql://root@localhost/diesel_example
      MYSQL_UNIT_TEST_DATABASE_URL: mysql://root@localhost/diesel_unit_test
      RUST_TEST_THREADS: 1
      MYSQLCLIENT_LIB_DIR: /usr/local/Cellar/mysql/8.0.19/lib
    setup:
      - script: |
          brew update &&
          brew install mysql &&
          brew services start mysql &&
          brew services stop mysql;sleep 3;brew services start mysql &&
          sleep 2 &&
          /usr/local/Cellar/mysql/8.0.19/bin/mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'root'@'localhost';" -uroot
        displayName: Install mysql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Linux_sqlite
    displayName: Linux SQLite
    vmImage: ubuntu-16.04
    variables:
      BACKEND: sqlite
      SQLITE_DATABASE_URL: /tmp/test.db

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Linux_postgres
    displayName: Linux PostgreSQL
    vmImage: ubuntu-16.04
    variables:
      BACKEND: postgres
      PG_DATABASE_URL: postgres://postgres:postgres@localhost/
      PG_EXAMPLE_DATABASE_URL: postgres://postgres:postgres@localhost/diesel_example
    setup:
      - script: |
          sudo apt-get update &&
          sudo apt-get -y install postgresql libpq-dev &&
          echo "host    all             all             127.0.0.1/32            md5" > sudo tee -a /etc/postgresql/9.5/main/pg_hba.conf &&
          sudo service postgresql restart && sleep 3 &&
          sudo -u postgres psql -c "ALTER USER postgres PASSWORD '<PASSWORD>';" &&
          sudo service postgresql restart && sleep 3
        displayName: Install postgresql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Linux_mysql
    displayName: Linux MySQL
    vmImage: ubuntu-16.04
    variables:
      BACKEND: mysql
      MYSQL_DATABASE_URL: mysql://root:root@localhost/diesel_test
      MYSQL_EXAMPLE_DATABASE_URL: mysql://root:root@localhost/diesel_example
      MYSQL_UNIT_TEST_DATABASE_URL: mysql://root:root@localhost/diesel_unit_test
      RUST_TEST_THREADS: 1
    setup:
      - script: |
          sudo systemctl start mysql.service &&
          mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'root'@'localhost';" -uroot -proot
        displayName: Install mysql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Windows_sqlite
    displayName: Windows SQLite
    vmImage: vs2017-win2016
    variables:
      BACKEND: sqlite
      SQLITE_DATABASE_URL: C:\test.db
      SQLITE3_LIB_DIR: C:\sqlite

- template: _build/azure-pipelines-template.yml
  parameters:<commit_msg>Revert "Remove unused setup steps from azure pipeline"<commit_after>trigger: ["master"]
pr: ["master"]


jobs:
- template: _build/azure-pipelines-template.yml
  parameters:
    name: macOS_sqlite
    displayName: macOS SQLite
    vmImage: macOS-10.15
    variables:
      BACKEND: sqlite
      SQLITE_DATABASE_URL: /tmp/test.db
    setup:
      - script: |
          echo "Skip this step"

- template: _build/azure-pipelines-template.yml
  parameters:
    name: macOS_postgres
    displayName: macOS PostgreSQL
    vmImage: macOS-10.15
    variables:
      BACKEND: postgres
      PG_DATABASE_URL: postgres://postgres@localhost/
      PG_EXAMPLE_DATABASE_URL: postgres://postgres@localhost/diesel_example
    setup:
      - script: |
          brew update
          brew uninstall --ignore-dependencies libpq
          brew install postgres
          /usr/local/Cellar/postgresql/12.2/bin/initdb --locale=C -E UTF-8 /usr/local/var/postgres
          brew services start postgresql
          sleep 3
          /usr/local/opt/postgres/bin/createuser -s postgres
        displayName: Install postgresql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: macOS_mysql
    displayName: macOS MySQL
    vmImage: macOS-10.15
    variables:
      BACKEND: mysql
      MYSQL_DATABASE_URL: mysql://root@localhost/diesel_test
      MYSQL_EXAMPLE_DATABASE_URL: mysql://root@localhost/diesel_example
      MYSQL_UNIT_TEST_DATABASE_URL: mysql://root@localhost/diesel_unit_test
      RUST_TEST_THREADS: 1
      MYSQLCLIENT_LIB_DIR: /usr/local/Cellar/mysql/8.0.19/lib
    setup:
      - script: |
          brew update &&
          brew install mysql &&
          brew services start mysql &&
          brew services stop mysql;sleep 3;brew services start mysql &&
          sleep 2 &&
          /usr/local/Cellar/mysql/8.0.19/bin/mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'root'@'localhost';" -uroot
        displayName: Install mysql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Linux_sqlite
    displayName: Linux SQLite
    vmImage: ubuntu-16.04
    variables:
      BACKEND: sqlite
      SQLITE_DATABASE_URL: /tmp/test.db
    setup:
      - script: |
          echo "Skip this step"

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Linux_postgres
    displayName: Linux PostgreSQL
    vmImage: ubuntu-16.04
    variables:
      BACKEND: postgres
      PG_DATABASE_URL: postgres://postgres:postgres@localhost/
      PG_EXAMPLE_DATABASE_URL: postgres://postgres:postgres@localhost/diesel_example
    setup:
      - script: |
          sudo apt-get update &&
          sudo apt-get -y install postgresql libpq-dev &&
          echo "host    all             all             127.0.0.1/32            md5" > sudo tee -a /etc/postgresql/9.5/main/pg_hba.conf &&
          sudo service postgresql restart && sleep 3 &&
          sudo -u postgres psql -c "ALTER USER postgres PASSWORD '<PASSWORD>';" &&
          sudo service postgresql restart && sleep 3
        displayName: Install postgresql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Linux_mysql
    displayName: Linux MySQL
    vmImage: ubuntu-16.04
    variables:
      BACKEND: mysql
      MYSQL_DATABASE_URL: mysql://root:root@localhost/diesel_test
      MYSQL_EXAMPLE_DATABASE_URL: mysql://root:root@localhost/diesel_example
      MYSQL_UNIT_TEST_DATABASE_URL: mysql://root:root@localhost/diesel_unit_test
      RUST_TEST_THREADS: 1
    setup:
      - script: |
          sudo systemctl start mysql.service &&
          mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'root'@'localhost';" -uroot -proot
        displayName: Install mysql

- template: _build/azure-pipelines-template.yml
  parameters:
    name: Windows_sqlite
    displayName: Windows SQLite
    vmImage: vs2017-win2016
    variables:
      BACKEND: sqlite
      SQLITE_DATABASE_URL: C:\test.db
      SQLITE3_LIB_DIR: C:\sqlite
    setup:
      - script: |
          echo "Skip this step"

- template: _build/azure-pipelines-template.yml
  parameters:
{'fraction_non_alphanumeric': 0.09128937007874016, 'fraction_numerical': 0.015501968503937008, 'mean_word_length': 2.6371364653243847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2804802', 'n_tokens_mistral': 2745, 'n_tokens_neox': 2564, 'n_words': 566}