Skip to content

Commit

Permalink
Merge pull request #2 from aurora-multiphysics/cmacmackin/badges
Browse files Browse the repository at this point in the history
Setting up various badges for the repository
  • Loading branch information
alexanderianblair authored Jun 24, 2024
2 parents fb3b2ee + 915351c commit dc141df
Show file tree
Hide file tree
Showing 25 changed files with 479 additions and 358 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[*.sh]
indent_style = space
indent_size = 4
space_redirects = true
keep_padding = true
never_split = true

[unit/run_tests]
indent_style = space
indent_size = 4
space_redirects = true
keep_padding = true
never_split = true
1 change: 1 addition & 0 deletions .github/linters/.clang-format
1 change: 1 addition & 0 deletions .github/linters/.markdown-lint.yml
1 change: 1 addition & 0 deletions .github/linters/.yaml-lint.yml
46 changes: 46 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions: { }

jobs:
build:
name: Lint
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Super-linter
uses: super-linter/super-linter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ANSIBLE: false
VALIDATE_CHECKOV: false
VALIDATE_CPP: false
VALIDATE_JSCPD: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_PYTHON_RUFF: false
24 changes: 17 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
---
name: BuildTest
on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
docker-build-test-ubuntu:
runs-on: ubuntu-latest
name: BuildTestUbuntu
env:
PRCOMMITSHA : ${{ github.event.pull_request.head.sha }}
PRCOMMITSHA: ${{ github.event.pull_request.head.sha }}
PRREPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
steps:
# First check out the repository to get the docker file
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
# Print the context for this GitHub workflow
- name: PrintGithubContext
run: echo ${PRCOMMITSHA:-$GITHUB_SHA} ${PRREPOSITORY:-$GITHUB_REPOSITORY}
run: echo "${PRCOMMITSHA:-$GITHUB_SHA}" "${PRREPOSITORY:-$GITHUB_REPOSITORY}"
# Now build in a container with all deps
- name: DockerBuildTest
run: |
docker build -t ci-platypus-ubuntu \
--build-arg build_git_sha=${PRCOMMITSHA:-$GITHUB_SHA} \
--build-arg build_git_repo=${PRREPOSITORY:-$GITHUB_REPOSITORY} \
--build-arg build_git_sha="${PRCOMMITSHA:-$GITHUB_SHA}" \
--build-arg build_git_repo="${PRREPOSITORY:-$GITHUB_REPOSITORY}" \
--build-arg coverage=true \
docker/platypus
- name: UploadCoverage
run: |
ci_env=$(bash <(curl -s https://codecov.io/env))
# shellcheck disable=SC2086
docker run $ci_env -e CI=true ci-platypus-ubuntu:latest \
bash /opt/platypus/scripts/upload-coverage.sh
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/weekly_build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Publish Docker Images
on:
workflow_dispatch:
schedule:
# Schedule to update image every Monday morning at 04:00.
- cron: '00 4 * * 1'
- cron: '00 4 * * 1'

jobs:
push-platypus-deps-image-to-docker-hub:
Expand Down
140 changes: 0 additions & 140 deletions .gitlab-ci.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
###########################
###########################
## Markdown Linter rules ##
###########################
###########################

# Linter rules doc:
# - https://github.com/DavidAnson/markdownlint
#
# Note:
# To comment out a single error:
# <!-- markdownlint-disable -->
# any violations you want
# <!-- markdownlint-restore -->
#

###############
# Rules by id #
###############
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
MD013:
line_length: 100 # Line length 80 is far too short
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD041: false # Allow MOOSE configuration data before first heading

#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
73 changes: 63 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,64 @@
---
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format

- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-tidy
args: [-p=./build, -config-file=./.clang-tidy, --warnings-as-errors=*, -extra-arg=-std=c++17, -extra-arg=-stdlib=libstdc++]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format

# Not yet figured out how to configure this properly
# - repo: https://github.com/pocc/pre-commit-hooks
# rev: v1.3.5
# hooks:
# - id: clang-tidy
# args:
# - "-p=./build"
# - "-config-file=./.clang-tidy"
# - "--warnings-as-errors=*"
# - "-extra-arg=-std=c++17"
# - "-extra-arg=-stdlib=libstdc++"

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.3
hooks:
- id: editorconfig-checker
alias: ec

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck

# Hadolint isn't trivial to install
# - repo: https://github.com/hadolint/hadolint
# rev: v2.12.0
# hooks:
# - id: hadolint

# Note: needs node.js >= 18, which is more recent than version
# distributed with Ubuntu 22.4. The latest versions of node.js can
# be installed using the instructions at
# https://github.com/nodesource/distributions?tab=readme-ov-file#debian-and-ubuntu-based-distributions
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint-fix

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint

- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks
Loading

0 comments on commit dc141df

Please sign in to comment.