chore(deps-dev): bump minitest from 5.25.2 to 5.25.4 #243
Workflow file for this run
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: Ruby-CI test matrix | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
env: | |
LOOKERSDK_BASE_URL: https://localhost:20000 | |
LOOKERSDK_VERIFY_SSL: false | |
LOOKERSDK_API_VERSION: "4.0" | |
jobs: | |
setup: | |
uses: looker-open-source/reusable-actions/.github/workflows/supported-versions.yml@main | |
test: | |
name: Ruby-CI ${{ matrix.ruby-version }}/${{ matrix.looker }}/multipart ${{ matrix.use_faraday_multipart }} | |
env: | |
LOOKERSDK_CLIENT_ID: ${{ secrets.LOOKERSDK_CLIENT_ID }} | |
LOOKERSDK_CLIENT_SECRET: ${{ secrets.LOOKERSDK_CLIENT_SECRET }} | |
CI_REPORTS: results/Ruby-CI-ruby_${{ matrix.ruby-version }}_Looker_${{ matrix.looker }}_multipart_${{ matrix.use_faraday_multipart }} | |
needs: setup | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: [2.7.8, 3.0.6, 3.1.4] | |
looker: ${{ fromJson(needs.setup.outputs.matrix_json) }} | |
use_faraday_multipart: ['true', 'false'] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ secrets.GCP_AR_READER_SA_KEY }} | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
create_credentials_file: true | |
export_environment_variables: true | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Authenticate Artifact Repository | |
run: gcloud auth configure-docker us-west1-docker.pkg.dev --quiet | |
- name: Pull and run Looker docker image | |
# TODO: can we cache some layers of the image for faster download? | |
# we probably don't want to cache the final image for IP security... | |
run: | | |
docker pull --quiet us-west1-docker.pkg.dev/cloud-looker-sdk-codegen-cicd/looker/${{ matrix.looker }} | |
# set $LOOKER_OPTS to --no-ssl if we want to turn off ssl | |
docker run --name looker-sdk-codegen-ci -d -p 10000:9999 -p 20000:19999 us-west1-docker.pkg.dev/cloud-looker-sdk-codegen-cicd/looker/${{ matrix.looker }} | |
docker logs -f looker-sdk-codegen-ci --until=30s & | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: false | |
- name: Install dependencies | |
run: bundle install | |
- name: Mock .netrc | |
run: | | |
mkdir -p test/fixtures | |
echo "machine localhost" > test/fixtures/.netrc | |
echo " login $LOOKERSDK_CLIENT_ID" >> test/fixtures/.netrc | |
echo " password $LOOKERSDK_CLIENT_SECRET" >> test/fixtures/.netrc | |
chmod 600 test/fixtures/.netrc | |
- name: Check that Looker is ready | |
run: | | |
${{ github.workspace }}/.github/scripts/wait_for_looker.sh | |
- name: Report Failure | |
run: | | |
curl --request POST \ | |
--url https://api.github.com/repos/looker-open-source/sdk-codegen/check-runs \ | |
--header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
--header "content-type: application/json" \ | |
--header "Accept: application/vnd.github.v3+json" \ | |
--data '{ | |
"name": "Ruby-CI Tests", | |
"head_sha": "${{ github.event.pull_request.head.sha || github.sha }}", | |
"conclusion": "failure" | |
}' \ | |
--fail | |
if: failure() | |
- name: Run tests | |
run: bundle exec rake test --trace | |
env: | |
USE_FARADAY_MULTIPART: ${{ matrix.use_faraday_multipart }} | |
- name: remove mock .netrc | |
if: ${{ always() }} | |
run: | | |
rm -f test/fixtures/.netrc | |
- name: Upload ts unit test results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ruby-ci-test-results-ruby_${{ matrix.ruby-version }}_Looker_${{ matrix.looker }}_multipart_${{ matrix.use_faraday_multipart }} | |
path: results/ | |
publish-test-results: | |
needs: [test] | |
if: success() || failure() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
# Cosmetic issue with `check_name` being associated to the wrong | |
# workflow: https://github.com/EnricoMi/publish-unit-test-result-action/issues/12 | |
check_name: Ruby-CI Tests | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
report_individual_runs: true | |
check_run_annotations: 'none' | |
compare_to_earlier_commit: false | |
files: 'artifacts/**/*.xml' |