Skip to content

Commit

Permalink
Run rubocop in matrix and stop fetching docker ci image
Browse files Browse the repository at this point in the history
  • Loading branch information
feelepxyz committed Aug 3, 2020
1 parent 0e83170 commit 10aa3de
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -17,7 +17,6 @@ jobs:
run: |
docker pull ubuntu:18.04
docker pull "dependabot/dependabot-core:latest"
docker pull "dependabot/dependabot-core-ci:latest" || true
- name: Build dependabot-core-ci image
run: |
rm .dockerignore
Expand All @@ -26,7 +25,6 @@ jobs:
-f Dockerfile.ci \
--cache-from ubuntu:18.04 \
--cache-from "dependabot/dependabot-core:latest" \
--cache-from "dependabot/dependabot-core-ci:latest" \
.
- name: Push image to packages
run: |
Expand All @@ -37,14 +35,35 @@ jobs:
name: Rubocop
runs-on: ubuntu-latest
needs: ci-image
strategy:
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
steps:
- name: Pull image from packages
run: |
docker login docker.pkg.github.com -u x -p ${{ secrets.GITHUB_TOKEN }}
docker pull "docker.pkg.github.com/${{ github.repository }}/dependabot-core-ci:${{ github.sha }}"
- name: Run Rubocop linting
run: |
docker run --rm docker.pkg.github.com/${{ github.repository }}/dependabot-core-ci:${{ github.sha }} bash -c "cd /home/dependabot/dependabot-core && rake ci:rubocop"
docker run --rm docker.pkg.github.com/${{ github.repository }}/dependabot-core-ci:${{ github.sha }} bash -c "cd /home/dependabot/dependabot-core/${{ matrix.suite }} && bundle exec rubocop . -c ../.rubocop.yml"
rspec:
name: Rspec
Expand Down
18 changes: 0 additions & 18 deletions Rakefile
Expand Up @@ -36,24 +36,6 @@ def run_command(command)
exit 1 unless system(command)
end

namespace :ci do
task :rubocop do
packages = changed_packages
puts "Running rubocop on: #{packages.join(', ')}"
packages.each do |package|
run_command("cd #{package} && bundle exec rubocop -c ../.rubocop.yml")
end
end

task :rspec do
packages = changed_packages
puts "Running rspec on: #{packages.join(', ')}"
packages.each do |package|
run_command("cd #{package} && bundle exec rspec spec")
end
end
end

# rubocop:disable Metrics/BlockLength
namespace :gems do
task build: :clean do
Expand Down

0 comments on commit 10aa3de

Please sign in to comment.