Skip to content

Commit

Permalink
Set up matrix builds for bundler1 and bundler2
Browse files Browse the repository at this point in the history
  • Loading branch information
feelepxyz committed Mar 22, 2021
1 parent b9bc877 commit 1975d59
Show file tree
Hide file tree
Showing 3 changed files with 656 additions and 619 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@ jobs:
fail-fast: false
matrix:
suite:
- bundler
- cargo
- common
- composer
- dep
- docker
- elm
- git_submodules
- github_actions
- go_modules
- gradle
- hex
- maven
- npm_and_yarn
- nuget
- omnibus
- python
- terraform
- { path: bundler, name: bundler1 }
- { path: bundler, name: bundler2 }
- { path: cargo, name: cargo }
- { path: common, name: common }
- { path: composer, name: composer }
- { path: dep, name: dep }
- { path: docker, name: docker }
- { path: elm, name: elm }
- { path: git_submodules, name: git_submodules }
- { path: github_actions, name: github_actions }
- { path: go_modules, name: go_modules }
- { path: gradle, name: gradle }
- { path: hex, name: hex }
- { path: maven, name: maven }
- { path: npm_and_yarn, name: npm_and_yarn }
- { path: nuget, name: nuget }
- { path: omnibus, name: omnibus }
- { path: python, name: python }
- { path: terraform, name: terraform }
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -91,28 +92,29 @@ jobs:
docker push "$CORE_CI_IMAGE:latest"
docker push "$CORE_CI_IMAGE:ci--$BRANCH_REF"
- name: Run Python flake8 linting
if: matrix.suite == 'python'
if: matrix.suite.name == 'python'
run: |
docker run --rm "$CORE_CI_IMAGE" bash -c "pyenv exec flake8 python/helpers/. --count --exclude=./.*,./python/spec/fixtures --show-source --statistics"
- name: Run Ruby Rubocop linting
run: |
docker run --rm "$CORE_CI_IMAGE" bash -c "cd /home/dependabot/dependabot-core/${{ matrix.suite }} && bundle exec rubocop ."
docker run --rm "$CORE_CI_IMAGE" bash -c "cd /home/dependabot/dependabot-core/${{ matrix.suite.path }} && bundle exec rubocop ."
- name: Run js linting and tests
if: matrix.suite == 'npm_and_yarn'
if: matrix.suite.name == 'npm_and_yarn'
run: |
docker run --rm "$CORE_CI_IMAGE" bash -c "cd /opt/npm_and_yarn && npm run lint"
docker run --rm "$CORE_CI_IMAGE" bash -c "cd /opt/npm_and_yarn && npm test"
- name: Run bundler v1 native helper specs
if: matrix.suite == 'bundler'
if: matrix.suite.name == 'bundler1'
run: |
docker run --rm "$CORE_CI_IMAGE" bash -c \
"cd /home/dependabot/dependabot-core/bundler/helpers/v1 && BUNDLER_VERSION=1 bundle install && BUNDLER_VERSION=1 bundle exec rspec spec"
- name: Run bundler v2 native helper specs
if: matrix.suite == 'bundler'
if: matrix.suite.name == 'bundler2'
run: |
docker run --rm "$CORE_CI_IMAGE" bash -c \
"cd /home/dependabot/dependabot-core/bundler/helpers/v2 && BUNDLER_VERSION=2 bundle install && BUNDLER_VERSION=2 bundle exec rspec spec"
- name: Run ${{ matrix.suite }} tests with rspec
- name: Run ${{ matrix.suite.name }} tests with rspec
run: |
docker run --env "CI=true" --env "DEPENDABOT_TEST_ACCESS_TOKEN=$DEPENDABOT_TEST_ACCESS_TOKEN" --rm "$CORE_CI_IMAGE" bash -c \
"cd /home/dependabot/dependabot-core/${{ matrix.suite }} && bundle exec rspec spec"
echo "SUITE_NAME=${{ matrix.suite.name }}" >> $GITHUB_ENV
docker run --env "CI=true" --env "DEPENDABOT_TEST_ACCESS_TOKEN=$DEPENDABOT_TEST_ACCESS_TOKEN" --env "SUITE_NAME=$SUITE_NAME" --rm "$CORE_CI_IMAGE" bash -c \
"cd /home/dependabot/dependabot-core/${{ matrix.suite.path }} && bundle exec rspec spec"
Loading

0 comments on commit 1975d59

Please sign in to comment.