Skip to content

Commit

Permalink
Merge branch 'main' into obrok/merge-main
Browse files Browse the repository at this point in the history
  • Loading branch information
obrok committed Mar 3, 2023
2 parents e1f7212 + 57566a3 commit 534c255
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/run_e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fi

if [[ -n "${ADDER:-}" ]]; then
ARGS+=(-e "ADDER=${ADDER}")
ARGS+=(-e "ADDER_METADATA=/contracts/adder/target/ink/adder.json")
ARGS+=(-e "ADDER_METADATA=/contracts/adder/target/ink/metadata.json")
fi

if [[ -n "${BUTTON_GAME_METADATA:-}" ]]; then
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/check-excluded-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
uses: actions-rs/toolchain@v1

- name: Check excluded package
env:
RUSTC_WRAPPER: ""
RUSTC_WORKSPACE_WRAPPER: sccache
run: |
cd ${{ matrix.package }}
rustup component add clippy rustfmt
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: GH Action YAML linter

on:
pull_request:
paths:
- ".github/**/**.yml"
- ".github/**/**.yaml"

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
main:
name: YAML Lint
runs-on: ubuntu-20.04
steps:
- name: GIT | Checkout source code
uses: actions/checkout@v3
with:
repository: Cardinal-Cryptography/aleph-node
token: ${{ secrets.CI_GH_TOKEN }}

- name: GIT | Check diff
id: check-diff
run: |
git fetch --quiet origin ${GITHUB_BASE_REF}:refs/remotes/origin/${GITHUB_BASE_REF}
YAML_FILES=`git --no-pager diff origin/${GITHUB_BASE_REF} --name-only \
| grep -E ".github\/.*\/.*(.yaml|.yml)" | tr '\n' ' '`
echo "Changed YAML files: ${YAML_FILES}"
echo "YAML_FILES=`echo $YAML_FILES`" >> $GITHUB_ENV
- name: LINT | Execute yaml-lint
uses: ibiqlik/action-yamllint@v3.1.1
with:
strict: true
file_or_dir: ${{ env.YAML_FILES }}
config_file: .yamllint
57 changes: 57 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
extends: default

rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
level: warning
require-starting-space: true
min-spaces-from-content: 2
comments-indentation: disable
document-end: disable
document-start: enable
empty-lines:
max: 2
max-start: 1
max-end: 1
empty-values:
forbid-in-block-mappings: false
forbid-in-flow-mappings: false
hyphens:
max-spaces-after: 1
indentation:
spaces: consistent
indent-sequences: true
check-multi-line-strings: false
key-duplicates: enable
key-ordering: disable
line-length:
max: 100
level: error
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: false
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy:
allowed-values:
- "true"
- "false"
check-keys: false
2 changes: 1 addition & 1 deletion contracts/adder/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ink_build cargo contract build --release --quiet 1>&2
export ADDER

ADDER=$(
ink_build cargo contract instantiate --url "$NODE_URL" --suri "$AUTHORITY" --skip-confirm --output-json \
ink-build cargo contract instantiate --url "$NODE_URL" --suri "$AUTHORITY" --skip-confirm --output-json \
| jq -r ".contract"
)
echo "$ADDER"

0 comments on commit 534c255

Please sign in to comment.