Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/probots.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
---

enabled:
- cla
52 changes: 52 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---

name: Analysis

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 13 7 * * 6

jobs:
linting:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: shellcheck
uses: azohra/shell-linter@6bbeaa868df09c34ddc008e6030cfe89c03394a1
with:
path: scripts/test-*
severity: error

- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml

vulnerabilities:
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: initialize
uses: github/codeql-action/init@v1
with:
languages: ruby

- name: codeql analyze
uses: github/codeql-action/analyze@v1
45 changes: 45 additions & 0 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---

name: Pre release

on:
push:
tags: [ v*.*.* ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

-
name: GPG config
run: |
mkdir -p ~/.gnupg
cat << EOF >> ~/.gnupg/options
keyserver keys.openpgp.org
keyserver-options auto-key-retrieve
EOF

-
name: Verify tag signature
run: |
# NOTE: Solve the problem with Github action checkout
# https://github.com/actions/checkout/issues/290
git fetch --tags --force

version=${GITHUB_REF#refs/tags/*}
git show $version
git tag -v $version
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
name: Run tests
on: [push]
---

name: Test

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
ruby: [ "2.6", "2.7", "3.0", "3.1" ]
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Install and start toxiproxy
run: ./bin/start-toxiproxy.sh
- name: Run tests
Expand Down
31 changes: 31 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

yaml-files:
- "*.yaml"
- "*.yml"

ignore: |
vendor/**/*

rules:
comments:
require-starting-space: true
comments-indentation: enable
document-start:
present: true
indentation:
spaces: 2
indent-sequences: true
check-multi-line-strings: true
line-length:
max: 100
level: warning
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: false
key-duplicates: enable
new-lines:
type: unix
trailing-spaces: enable
quoted-strings:
quote-type: double
required: only-when-needed
2 changes: 2 additions & 0 deletions shipit.rubygems.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
---

fetch:
- fetch-gem-version toxiproxy Shopify/toxiproxy-ruby