Skip to content

Commit

Permalink
Merge pull request #1 from idrinth-api-bench/add-current-containers
Browse files Browse the repository at this point in the history
Add current containers
  • Loading branch information
Idrinth authored May 8, 2024
2 parents 0af8b35 + 3be5670 commit e3e35d7
Show file tree
Hide file tree
Showing 32 changed files with 847 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github:
- idrinth
ko_fi: idrinth
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 100
9 changes: 9 additions & 0 deletions .github/prace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 1
body:
patterns:
- '#\d+'
error: The body has to include an issue reference like `#0`
branch:
patterns:
- 'issue-\d{1,}-[a-z0-9-]+'
error: Branch must be called `issue-{id}-{short description}`
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# The Pull Request is ready

- [ ] fixes #<!-- YOUR ISSUE ID HERE -->
- [ ] all actions are passing
- [ ] only fixes a single issue

## Overview

<!-- Provide a brief description of the changes introduced by this
Pull Request. -->

## Review points

<!-- List the points to be reviewed in detail
and the points you are not confident about. -->
<!-- Delete this section if not needed -->

## Dockerfiles

- [ ] the dockerfiles work
- [ ] the containers are as small as possible

## Notes

<!-- Write any note or comment. You can share your thoughts or ideas. -->
<!-- Delete this section if not needed -->
5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- renovate
27 changes: 27 additions & 0 deletions .github/workflows/api-bench-build.hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: api-bench-build Hadolint
on:
push:
branches:
- the-one
paths:
- 'containers/api-bench-build/Dockerfile'
- '.github/workflows/api-bench-build.hadolint.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/api-bench-build/Dockerfile'
- '.github/workflows/api-bench-build.hadolint.yml'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install shellcheck -y
- run: wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
- run: sudo mv hadolint-Linux-x86_64 /usr/local/bin/hadolint
- run: sudo chmod +x /usr/local/bin/hadolint
- run: hadolint containers/api-bench-build/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/api-bench-gitea-action.hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: api-bench-gitea-action Hadolint
on:
push:
branches:
- the-one
paths:
- 'containers/api-bench-gitea-action/Dockerfile'
- '.github/workflows/api-bench-gitea-action.hadolint.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/api-bench-gitea-action/Dockerfile'
- '.github/workflows/api-bench-gitea-action.hadolint.yml'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install shellcheck -y
- run: wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
- run: sudo mv hadolint-Linux-x86_64 /usr/local/bin/hadolint
- run: sudo chmod +x /usr/local/bin/hadolint
- run: hadolint containers/api-bench-gitea-action/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/api-bench-gitlab-runner.hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: api-bench-gitlab-runner Hadolint
on:
push:
branches:
- the-one
paths:
- 'containers/api-bench-gitlab-runner/Dockerfile'
- '.github/workflows/api-bench-gitlab-runner.hadolint.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/api-bench-gitlab-runner/Dockerfile'
- '.github/workflows/api-bench-gitlab-runner.hadolint.yml'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install shellcheck -y
- run: wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
- run: sudo mv hadolint-Linux-x86_64 /usr/local/bin/hadolint
- run: sudo chmod +x /usr/local/bin/hadolint
- run: hadolint containers/api-bench-gitlab-runner/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/api-bench-history-microservice.hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: api-bench-history-microservice Hadolint
on:
push:
branches:
- the-one
paths:
- 'containers/api-bench-history-microservice/Dockerfile'
- '.github/workflows/api-bench-history-microservice.hadolint.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/api-bench-history-microservice/Dockerfile'
- '.github/workflows/api-bench-history-microservice.hadolint.yml'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install shellcheck -y
- run: wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
- run: sudo mv hadolint-Linux-x86_64 /usr/local/bin/hadolint
- run: sudo chmod +x /usr/local/bin/hadolint
- run: hadolint containers/api-bench-history-microservice/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/api-bench-history-website.hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: api-bench-history-website Hadolint
on:
push:
branches:
- the-one
paths:
- 'containers/api-bench-history-website/Dockerfile'
- '.github/workflows/api-bench-history-website.hadolint.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/api-bench-history-website/Dockerfile'
- '.github/workflows/api-bench-history-website.hadolint.yml'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install shellcheck -y
- run: wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
- run: sudo mv hadolint-Linux-x86_64 /usr/local/bin/hadolint
- run: sudo chmod +x /usr/local/bin/hadolint
- run: hadolint containers/api-bench-history-website/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/api-bench.hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: api-bench Hadolint
on:
push:
branches:
- the-one
paths:
- 'containers/api-bench/Dockerfile'
- '.github/workflows/api-bench.hadolint.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/api-bench/Dockerfile'
- '.github/workflows/api-bench.hadolint.yml'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: sudo apt-get install shellcheck -y
- run: wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
- run: sudo mv hadolint-Linux-x86_64 /usr/local/bin/hadolint
- run: sudo chmod +x /usr/local/bin/hadolint
- run: hadolint containers/api-bench/Dockerfile
52 changes: 52 additions & 0 deletions .github/workflows/global.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker
on:
push:
branches:
- the-one
paths:
- 'containers/*/Dockerfile'
- '.github/workflows/docker.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/*/Dockerfile'
- '.github/workflows/docker.yml'
jobs:
builder:
name: Builder
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git fetch --tags
- name: Cache Docker images.
uses: ScribeMD/docker-cache@0.5.0
with:
key: docker-${{ runner.os }}-${{ hashFiles('containers/api-bench-build/Dockerfile') }}
- run: docker build --build-arg="BUILD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" -t "idrinth/api-bench-build:$(git describe --tags `git rev-list --tags --max-count=1`)" --build-arg="BUILD_TIME=now" containers/api-bench-build
build:
needs:
- builder
strategy:
matrix:
folder:
- 'api-bench-gitlab-runner'
- 'api-bench'
- 'api-bench-gitea-action'
- 'api-bench-history-website'
- 'api-bench-history-microservice'
name: Build ${{ matrix.folder }}
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git fetch --tags
- name: Cache Docker images.
uses: ScribeMD/docker-cache@0.5.0
with:
key: docker-${{ runner.os }}-${{ hashFiles('containers/api-bench-build/Dockerfile') }}
read-only: true
- run: docker build --build-arg="BUILD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" --build-arg="BUILD_TIME=now" containers/${{ matrix.folder }}
34 changes: 34 additions & 0 deletions .github/workflows/global.pull-request-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pull request size
on:
pull_request:
branches:
- the-one
env:
CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.CURRENT_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.CURRENT_NODE_VERSION }}
cache: 'npm'
cache-dependency-path: |
framework/package-lock.json
documentation-website/package-lock.json
history-microservice/package-lock.json
history-website/package-lock.json
cli/package-lock.json
package-lock.json
- run: npm install -g "https://github.com/Idrinth/check-pr-length.git#patch-1"
- run: git remote add base https://github.com/idrinth/api-bench.git
- run: git config --global user.email "prs@example.com"
- run: git config --global user.name "PRS"
- run: git fetch base the-one
- run: git switch the-one
- run: git remote add pullrequest "https://github.com/${{github.event.pull_request.head.repo.full_name}}"
- run: git fetch pullrequest "${GITHUB_HEAD_REF}"
- run: git switch $GITHUB_HEAD_REF
- run: check-pr-length --max=350 --total=500 --base=the-one --silent=false --exclude="package-lock.json;*/package-lock.json"
41 changes: 41 additions & 0 deletions .github/workflows/global.spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Spellcheck
on:
push:
branches:
- the-one
paths:
- '**.md'
- 'package-lock.json'
- '.github/workflows/spellcheck.yml'
pull_request:
branches:
- the-one
paths:
- '**.md'
- 'package-lock.json'
- '.github/workflows/spellcheck.yml'
env:
CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }}
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js environment ${{ env.CURRENT_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.CURRENT_NODE_VERSION }}
cache: 'npm'
cache-dependency-path: |
framework/package-lock.json
documentation-website/package-lock.json
history-microservice/package-lock.json
history-website/package-lock.json
cli/package-lock.json
package-lock.json
- name: Build root
run: npm ci
- name: spellcheck
run: npm run spellcheck
41 changes: 41 additions & 0 deletions .github/workflows/root.mdlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: MARKDOWN-LINT
on:
push:
branches:
- the-one
paths:
- '*.md'
- '.github/**.md'
- 'containers/**.md'
- 'package-lock.json'
- '.github/workflows/root.mdlint.yml'
pull_request:
branches:
- the-one
paths:
- '*.md'
- '.github/**.md'
- 'containers/**.md'
- 'package-lock.json'
- '.github/workflows/root.mdlint.yml'
env:
CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.CURRENT_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.CURRENT_NODE_VERSION }}
cache: 'npm'
cache-dependency-path: |
framework/package-lock.json
documentation-website/package-lock.json
history-microservice/package-lock.json
history-website/package-lock.json
cli/package-lock.json
package-lock.json
- run: npm ci
- run: npm run lint-md
Loading

0 comments on commit e3e35d7

Please sign in to comment.