Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Simplify workflow by moving suite specific tests into test script #3430

Merged
merged 3 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,6 @@ jobs:
run: |
docker push "$CORE_CI_IMAGE:latest"
docker push "$CORE_CI_IMAGE:ci--$BRANCH_REF"
- name: Run Python flake8 linting
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 js linting and tests
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.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.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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

- name: Run ${{ matrix.suite.name }} tests
run: |
docker run --env "CI=true" --env "DEPENDABOT_TEST_ACCESS_TOKEN=$DEPENDABOT_TEST_ACCESS_TOKEN" --env "SUITE_NAME=${{ matrix.suite.name }}" --rm "$CORE_CI_IMAGE" bash -c \
Expand Down
12 changes: 12 additions & 0 deletions bundler/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@
bundle install
bundle exec rubocop .
bundle exec rspec spec

[ "$SUITE_NAME" == "bundler1" ] &&\
jurre marked this conversation as resolved.
Show resolved Hide resolved
cd helpers/v1 && \
BUNDLER_VERSION=1 bundle install && \
BUNDLER_VERSION=1 bundle exec rspec spec &&\
cd -

[ "$SUITE_NAME" == "bundler2" ] &&\
cd helpers/v2 && \
BUNDLER_VERSION=2 bundle install && \
BUNDLER_VERSION=2 bundle exec rspec spec &&\
cd -
3 changes: 3 additions & 0 deletions npm_and_yarn/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
bundle install
bundle exec rubocop .
bundle exec rspec spec

cd /opt/npm_and_yarn && npm run lint && cd -
cd /opt/npm_and_yarn && npm test && cd -
1 change: 1 addition & 0 deletions python/script/ci-test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

bundle install
pyenv exec flake8 helpers/. --count --exclude=./.*,./python/spec/fixtures --show-source --statistics
bundle exec rubocop .
bundle exec rspec spec