-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): connect repo to Community-TC
- Loading branch information
1 parent
1fc8f5f
commit 298a1ac
Showing
8 changed files
with
149 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:gemdir: | ||
- ~/.gem/ruby | ||
install: -n /usr/local/bin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
if [ -f .pre-commit-config.yaml ]; then | ||
echo 'pre-commit configuration detected, but `pre-commit install` was never run' 1>&2 | ||
exit 1 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
# Trims trailing whitespace | ||
- id: trailing-whitespace | ||
# Makes sure files end in a newline and only a newline | ||
- id: end-of-file-fixer | ||
# Check for files that contain merge conflict strings | ||
- id: check-merge-conflict | ||
|
||
- repo: https://github.com/marco-c/taskcluster_yml_validator | ||
rev: v0.0.9 | ||
hooks: | ||
# Validates .taskcluster.yml file against possible GitHub events | ||
- id: taskcluster_yml | ||
|
||
ci: | ||
skip: [taskcluster_yml] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Style/StringLiterals: | ||
Enabled: false | ||
|
||
AllCops: | ||
NewCops: enable |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
version: 1 | ||
reporting: checks-v1 | ||
policy: | ||
pullRequests: public | ||
tasks: | ||
$let: | ||
head_rev: | ||
$if: tasks_for == "github-pull-request" | ||
then: ${event.pull_request.head.sha} | ||
else: ${event.after} | ||
repository: | ||
$if: tasks_for == "github-pull-request" | ||
then: ${event.pull_request.head.repo.clone_url} | ||
else: ${event.repository.url} | ||
in: | ||
$let: | ||
tests: | ||
- name: lint-ruby | ||
image: ruby:alpine | ||
command: | ||
- /bin/sh | ||
- '--login' | ||
- '-c' | ||
- >- | ||
apk update && apk add --no-cache git && | ||
git clone ${repository} repo && cd repo && | ||
git config advice.detachedHead false && | ||
git checkout ${head_rev} && | ||
bundle install && | ||
bundle info rubocop && | ||
rubocop | ||
- name: brew {audit, test, install} | ||
image: homebrew/brew | ||
command: | ||
- /bin/bash | ||
- '--login' | ||
- '-c' | ||
- >- | ||
git clone ${repository} repo && cd repo && | ||
git config advice.detachedHead false && | ||
git checkout ${head_rev} && | ||
brew audit --strict ./Formula/taskcluster.rb && | ||
brew test ./Formula/taskcluster.rb && | ||
brew install ./Formula/taskcluster.rb | ||
in: | ||
$let: | ||
test_tasks: | ||
$map: {$eval: tests} | ||
each(test): | ||
taskId: {$eval: as_slugid(test.name)} | ||
taskQueueId: proj-taskcluster/ci | ||
created: {$fromNow: ''} | ||
deadline: {$fromNow: '30 minutes'} | ||
payload: | ||
maxRunTime: 1800 | ||
command: {$eval: 'test.command'} | ||
image: {$eval: 'test.image'} | ||
metadata: | ||
name: ${test.name} | ||
description: ${test.name} | ||
owner: [email protected] | ||
source: ${repository} | ||
in: | ||
$flattenDeep: | ||
$match: | ||
(tasks_for == "github-pull-request" && event["action"] in ["opened","reopened","synchronize"]): | ||
{$eval: test_tasks} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gem 'rubocop', require: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.2) | ||
json (2.6.2) | ||
parallel (1.22.1) | ||
parser (3.1.2.0) | ||
ast (~> 2.4.1) | ||
rainbow (3.1.1) | ||
regexp_parser (2.5.0) | ||
rexml (3.2.5) | ||
rubocop (1.32.0) | ||
json (~> 2.3) | ||
parallel (~> 1.10) | ||
parser (>= 3.1.0.0) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.8, < 3.0) | ||
rexml (>= 3.2.5, < 4.0) | ||
rubocop-ast (>= 1.19.1, < 2.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 3.0) | ||
rubocop-ast (1.19.1) | ||
parser (>= 3.1.1.0) | ||
ruby-progressbar (1.11.0) | ||
unicode-display_width (2.2.0) | ||
|
||
PLATFORMS | ||
arm64-darwin-21 | ||
|
||
DEPENDENCIES | ||
rubocop | ||
|
||
BUNDLED WITH | ||
2.3.11 |