Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
style: changing linting targets to be prefixed with 'check'
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperC286 committed Sep 15, 2023
1 parent e49d9ec commit 0483ad2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,26 @@ jobs:
uses: actions/checkout@v3
- name: Check formatting.
run: earthly --ci +check-yaml-formatting
go-linting:
check-go-linting:
name: Check Go Linting
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.7.17.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.17/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Check linting.
run: earthly --ci +go-linting
sh-linting:
run: earthly --ci +check-go-linting
check-sh-linting:
name: Check Sh Linting
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.7.17.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.17/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Check linting.
run: earthly --ci +sh-linting
run: earthly --ci +check-sh-linting
module-tidying:
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/github-actions-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ env:
FORCE_COLOR: 1

jobs:
Linting:
check-linting:
name: Check Linting
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.7.17.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.17/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Lint GitHub Actions Workflows.
run: earthly +github-actions-workflows-linting
- name: Check GitHub Actions workflows linting.
run: earthly +check-github-actions-workflows-linting
20 changes: 10 additions & 10 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ fix-formatting:
BUILD +fix-yaml-formatting


go-linting:
check-go-linting:
FROM +golang-base
RUN go install github.com/golangci/golangci-lint/cmd/[email protected]
DO +INSTALL_DEPENDENCIES
DO +COPY_SOURCECODE
RUN ./ci/go-linting.sh
RUN ./ci/check-go-linting.sh


ubuntu-base:
Expand All @@ -147,24 +147,24 @@ ubuntu-base:
RUN apt-get update --fix-missing


sh-linting:
check-sh-linting:
FROM +ubuntu-base
RUN apt-get install shellcheck -y
DO +COPY_CI_DATA
RUN ./ci/sh-linting.sh
RUN ./ci/check-sh-linting.sh


github-actions-workflows-linting:
check-github-actions-workflows-linting:
FROM +golang-base
RUN go install github.com/rhysd/actionlint/cmd/[email protected]
DO +COPY_METADATA
RUN ./ci/github-actions-workflows-linting.sh
RUN ./ci/check-github-actions-workflows-linting.sh


linting:
BUILD +go-linting
BUILD +sh-linting
BUILD +github-actions-workflows-linting
check-linting:
BUILD +check-go-linting
BUILD +check-sh-linting
BUILD +check-github-actions-workflows-linting


check-module-tidying:
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 0483ad2

Please sign in to comment.