Skip to content

Commit 506209d

Browse files
authored
basic ci (#14)
* lint all files except cardano config
1 parent e2579d0 commit 506209d

File tree

15 files changed

+115
-39
lines changed

15 files changed

+115
-39
lines changed

.envrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# If your on windows use wsl / git bash / cygwin / msys2 with direnv
22

3-
# This repo only accepts signed commits:
3+
# This repository only accepts signed commits:
44
# point out to users at commit time that commits need to be signed,
55
# not once they've done many commits and are trying to push a PR:
66
git config --local commit.gpgSign true
77
git config --local tag.gpgSign true
88

9+
# docker on mac expects linux/arm64/v8 but currently we don't publish that build
10+
if [[ "$(uname -s)" == "Darwin" ]] && [[ "$(uname -m)" == "arm64" ]]; then
11+
export DOCKER_DEFAULT_PLATFORM=linux/arm64
12+
fi
13+
914
export MIDNIGHT_NODE_IMAGE="midnightnetwork/midnight-node:0.8.0"
1015

1116
export POSTGRES_HOST="postgres" # TODO: replace with IP or host to postgres connection if not connecting to the docker one.

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: ""
88

99
### Context & versions:
1010

11-
<!-- Explain your setup and what versions have been used. -->
11+
<!-- Explain your setup and what versions have been used. -->
1212

1313
### Steps to reproduce:
1414

.github/ISSUE_TEMPLATE/documentation-improvement.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ assignees: ""
88

99
Documentation Improvement: Clearly describe the improvement requested for existing content and/or raise missing areas of documentation and provide details for what should be included.
1010

11-
### Documentation url:
11+
### Documentation URL:
1212
<!-- Specify the exact location of the documentation you are referencing. -->
1313

14-
### Description of Improvement:
14+
### Description of Improvement:
1515
<!-- Provide a detailed description of the requested improvement. -->
1616

1717
### Proposed Solution (Optional):

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ assignees: ""
88

99
Feature Request: Clearly describe your feature, its benefits, and most important the expected outcome. This helps us analyze the proposed solution and develop alternatives
1010

11-
### Describe the proposed feature.
11+
## Describe the proposed feature:
1212

13-
### User Need:
13+
## User Need:
1414
<!-- What user need does this feature address? Include use cases and user stories. -->
1515

16-
### Expected Benefit:
16+
## Expected Benefit:
1717
<!--What benefits does this feature provide to users and the platform? -->
1818

19-
### Details:
19+
## Details:
2020
<!--Proposed implementation ideas, alternatives considered, dependencies, and any additional information.-->

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Overview
1+
# Overview
22

33
<!-- Describe your changes briefly here, with some context as to why this is needed. -->
44

@@ -12,9 +12,9 @@
1212
- [ ] All check jobs of the CI have succeeded
1313
- [ ] Self-reviewed the diff
1414
- [ ] Reviewer requested
15-
- [ ] Update README file (if relevant)
15+
- [ ] Update README.md file (if relevant)
1616
- [ ] Update documentation (if relevant)
17-
- [ ] No new TODOs introduced
17+
- [ ] No new todos introduced
1818

1919
## Links
2020

.github/linters/.markdown-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MD013: false # line length 80
2+
MD026: false
3+
MD034: false

.github/workflows/checkmarx.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Checkmarx One Scan
22

3+
# ↓ lock down top‐level permissions to only what we use
4+
permissions:
5+
contents: read # we only need to checkout code
6+
actions: read # to query workflows/runs
7+
pull-requests: write # to comment on or label PRs
8+
39
on:
410
pull_request:
511
branches: [ '**' ]

.github/workflows/ci.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
# ↓ lock down top‐level permissions to only what we use
4+
permissions:
5+
contents: read # we only need to checkout code
6+
actions: read # to query workflows/runs
7+
statuses: write
8+
9+
# Run on pushes to any branch and pull requests
10+
on:
11+
push:
12+
branches: ['main']
13+
pull_request:
14+
branches: ['**']
15+
16+
jobs:
17+
# Lint all YAML, JSON & Shell
18+
lint:
19+
name: Lint code & configs
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check out code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Check compose files
28+
run: |
29+
source ./.envrc
30+
docker compose -f compose.yml config -q
31+
docker compose -f compose-partner-chains.yml config -q
32+
docker compose -f proof-server.yml config -q
33+
34+
- name: Run Super-linter
35+
uses: github/super-linter@v7
36+
env:
37+
# only lint the file types you care about
38+
VALIDATE_YAML: true
39+
VALIDATE_JSON: true
40+
VALIDATE_SHELL: true
41+
VALIDATE_BASH: true
42+
VALIDATE_BASH_EXEC: true
43+
VALIDATE_CHECOV: true
44+
VALIDATE_GITHUB_ACTIONS: true
45+
VALIDATE_GITLEAKS: true
46+
VALIDATE_NATURAL_LANGUAGE: true
47+
VALIDATE_MARKDOWN: true
48+
VALIDATE_DOCKERFILE: true
49+
FILTER_REGEX_EXCLUDE: (^cardano-config/|LICENSE\.md)
50+
# tell it your default branch so it can diff
51+
DEFAULT_BRANCH: origin/main
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 🚀 Features
89

9-
### 🚀 Features
10-
11-
- Port from prior repo (#3)
10+
- Port from prior repository (#3)
1211
- If direnv isn't working give an appropriate error message.
1312
- /data dir should be .gitignored
1413
- Automatically create a random node key.
1514
- Only randomise the postgres password once.
1615
- Parametise cardano network
1716

18-
### 💼 Other
17+
## 💼 Other
1918

2019
- *(deps)* Bump checkmarx/ast-github-action from 2.3.18 to 2.3.19 (#9)
2120
- Be explicit about image

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Our Pledge
2+
23
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
34

45
## Our Standards
6+
57
Examples of behavior that contributes to creating a positive environment include:
68

79
- Using welcoming and inclusive language
@@ -12,25 +14,30 @@ Examples of behavior that contributes to creating a positive environment include
1214

1315
Examples of unacceptable behavior by participants include:
1416

15-
-The use of sexualized language or imagery and unwelcome sexual attention or advances
17+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
1618
- Trolling, insulting/derogatory comments, and personal or political attacks
1719
- Public or private harassment
1820
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
1921
- Other conduct which could reasonably be considered inappropriate in a professional setting
22+
2023
## Our Responsibilities
24+
2125
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
2226

2327
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
2428

2529
## Scope
26-
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
30+
31+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
2732

2833
## Enforcement
34+
2935
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at legal@midnight.foundation. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3036

3137
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
3238

3339
## Attribution
40+
3441
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
3542

3643
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)