-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: adding Continuous integration (CI) workflow
1 parent
0e64a8f
commit c14446a
Showing
19 changed files
with
292 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Continuous Integration (CI) | ||
|
||
on: pull_request | ||
|
||
env: | ||
# Forcing Earthly to use colours, to make reading output easier. | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
formatting: | ||
name: Formatting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
language: [rust, python, shell, yaml] | ||
steps: | ||
- name: Download Earthly v0.8.12. | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | ||
- name: Checkout code. | ||
uses: actions/checkout@v3 | ||
- name: Check formatting. | ||
run: earthly --ci +check-${{ matrix.language }}-formatting | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
language: [rust, shell] | ||
steps: | ||
- name: Download Earthly v0.8.12. | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/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 +check-${{ matrix.language }}-linting | ||
compile: | ||
name: Compile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Earthly v0.8.12. | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | ||
- name: Checkout code. | ||
uses: actions/checkout@v3 | ||
- name: Compile. | ||
run: earthly --ci +compile | ||
unit-test: | ||
name: Unit Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Earthly v0.8.12. | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | ||
- name: Checkout code. | ||
uses: actions/checkout@v3 | ||
- name: Unit test. | ||
run: earthly --ci +unit-test | ||
end-to-end-test: | ||
name: End to End Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Earthly v0.8.12. | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | ||
- name: Checkout code. | ||
uses: actions/checkout@v3 | ||
- name: End to End test. | ||
run: earthly --ci +end-to-end-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
formatter: | ||
type: basic | ||
retain_line_breaks: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
find "conventional_commits_linter/end-to-end-tests/features/" -type f | grep "[.]py$" | xargs -I {} autopep8 --exit-code --diff --aggressive --aggressive --max-line-length 120 "{}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
cargo fmt --all -- --check --config=group_imports=StdExternalCrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
cargo clippy --verbose --workspace --all-targets -- -D warnings | ||
cargo clippy --verbose --workspace --all-targets --all-features -- -D warnings | ||
cargo clippy --verbose --workspace --all-targets --no-default-features -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
shfmt --simplify --diff ./ci/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
yamlfmt -lint -dstar .github/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
cargo build --verbose --workspace | ||
cargo build --verbose --workspace --all-features | ||
cargo build --verbose --workspace --no-default-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
cd "conventional_commits_linter/end-to-end-tests/" | ||
behave |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
find "conventional_commits_linter/end-to-end-tests/features/" -type f | grep "[.]py$" | xargs -I {} autopep8 --in-place --aggressive --aggressive --max-line-length 120 "{}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
cargo fmt --all -- --config=group_imports=StdExternalCrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
shfmt --simplify --write ./ci/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
yamlfmt -dstar ./github/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -o errexit | ||
set -o xtrace | ||
|
||
cargo test --verbose --workspace | ||
cargo test --verbose --workspace --all-features | ||
cargo test --verbose --workspace --no-default-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters