Sha256: d8781662f068eae1959b49c3cacad299a3cd50e7bb8d0b5c47dd958cc39a24bc

Contents?: true

Size: 1.93 KB

Versions: 2

Compression:

Stored size: 1.93 KB

Contents

name: Run Tests

on:
  pull_request:
    branches:
      - master

jobs:
  pre-commit:
    runs-on: ubuntu-latest
    if: false == startsWith(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') && !contains(github.event.pull_request.labels.*.name, 'ci/skip/pre-commit')
    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-python@v1
    - name: Install pre-commit
      run: python -m pip install pre-commit
    - name: set PY
      run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
    - uses: actions/cache@v1
      with:
        path: ~/.cache/pre-commit
        key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
    - name: Run pre-commit
      run: pre-commit run --all-files --source ${{ github.event.pull_request.base.sha }} --origin ${{ github.event.pull_request.head.sha }} --show-diff-on-failure --color=always

  test:
    strategy:
      matrix:
        ruby-version: ['2.5', '2.6', '2.7']
        platform: [ubuntu-latest, macos-latest] # , windows-latest]
        # test only latest version on macos and windows
        exclude:
          - platform: macos-latest
            ruby-version: '2.5'
          - platform: macos-latest
            ruby-version: '2.6'
          # - platform: windows-latest
          #   ruby-version: '2.5'
          # - platform: windows-latest
          #   ruby-version: '2.6'
    runs-on: ${{ matrix.platform }}
    if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby ${{ matrix.ruby-version }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby-version }}
        bundler-cache: true
    - name: Test
      run: ./run-tests.sh
      shell: bash

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datadog_api_client-1.0.0 .github/workflows/test.yml
datadog_api_client-1.0.0.beta.3 .github/workflows/test.yml