Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: adding ci scripts shell linting #38

Merged
merged 1 commit into from
Mar 1, 2024
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
10 changes: 10 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ jobs:
uses: actions/checkout@v3
- name: Check YAML formatting.
run: earthly --ci +check-yaml-formatting
shell-linting:
name: Shell Formatting
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.8.1.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.1/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Check Shell formatting.
run: earthly --ci +check-shell-linting
e2e-test:
name: End to End Test
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ fix-formatting:
BUILD +fix-yaml-formatting


check-shell-linting:
FROM ubuntu:22.04
# https://askubuntu.com/questions/462690/what-does-apt-get-fix-missing-do-and-when-is-it-useful
RUN apt-get update --fix-missing
RUN apt-get install shellcheck -y
DO +COPY_SOURCECODE
RUN ./ci/check-shell-linting.sh


check-conventional-commits-linting:
FROM +rust-base
RUN cargo install conventional_commits_linter --version 0.12.3 --locked
Expand Down
6 changes: 6 additions & 0 deletions ci/check-shell-linting.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

set -o errexit
set -o xtrace

shellcheck ./ci/*
Loading