Skip to content

Commit

Permalink
migrate lint task from circleci to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Nov 27, 2024
1 parent 35001a9 commit 0bc3fee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
23 changes: 0 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ step_bundle_install: &step_bundle_install
else
echo "All required gems were found in cache."
fi
step_lint: &step_lint
run:
name: Lint with standardrb
# There's no straightforward way to get the number of available processors & CPU threads in CircleCI.
# Currently it always return 18 physical processors and 36 threads, regardless of executor size.
# The workaround is to use `cpu.shares / 1024`:
# https://discuss.circleci.com/t/environment-variable-set-to-the-number-of-available-cpus/32670/4
command: PARALLEL_PROCESSOR_COUNT=$((`cat /sys/fs/cgroup/cpu/cpu.shares` / 1024)) bundle exec standardrb
step_appraisal_install: &step_appraisal_install
run:
name: Install Appraisal gems
Expand Down Expand Up @@ -173,16 +165,6 @@ orbs:
- *step_run_all_tests
- store_test_results:
path: /tmp/rspec
lint:
<<: *test_job_default
steps:
- restore_cache:
keys:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/datadog/ci/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- *step_lint
commands:
docker-wait:
description: Wait for containers to listen on a TCP port.
Expand Down Expand Up @@ -249,11 +231,6 @@ workflows:
version: 2
build-and-test:
jobs:
- orb/lint:
<<: *config-3_3-small
name: lint
requires:
- build-3.2
- orb/build:
<<: *config-2_7
name: build-2.7
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@ on:
# The branches below must be a subset of the branches above
branches: [main]
jobs:
check:
name: Check types
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install dependencies
run: bundle install
- run: bundle exec rake standard

typecheck:
name: Type checking
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 0bc3fee

Please sign in to comment.