Skip to content

Commit

Permalink
Merge pull request #150 from SpringQL/lint_github_actions
Browse files Browse the repository at this point in the history
ci: fix actionlint warnings
  • Loading branch information
laysakura committed May 19, 2022
2 parents 7660710 + 9eb696a commit 8b2cbf8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/ci.yml
Expand Up @@ -131,15 +131,15 @@ jobs:
VERSION: 0.35.10
run: |
if [ "${{ matrix.os }}" = "macos-latest" ]; then
FILE_BASE=cargo-make-v${VERSION}-x86_64-apple-darwin
FILE_BASE="cargo-make-v${VERSION}-x86_64-apple-darwin"
else
FILE_BASE=cargo-make-v${VERSION}-x86_64-unknown-linux-musl
FILE_BASE="cargo-make-v${VERSION}-x86_64-unknown-linux-musl"
fi
mkdir -p ${HOME}/.local/bin
mkdir -p "${HOME}/.local/bin"
curl -L "${BASE_URL}/${VERSION}/${FILE_BASE}.zip" --output /tmp/cargo-make.zip
unzip /tmp/cargo-make.zip -d /tmp/cargo-make
mv -f /tmp/cargo-make/${FILE_BASE}/cargo-make $HOME/.local/bin/cargo-make
echo "$HOME/.local/bin" >> $GITHUB_PATH
unzip "/tmp/cargo-make.zip" -d /tmp/cargo-make
mv -f "/tmp/cargo-make/${FILE_BASE}/cargo-make" "$HOME/.local/bin/cargo-make"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install cargo-deadlinks
if: ${{ matrix.make.install-cargo-deadlinks }}
Expand All @@ -152,8 +152,8 @@ jobs:
else
FILE_BASE=cargo-deadlinks-linux
fi
curl -L "${BASE_URL}/${VERSION}/${FILE_BASE}" --output $HOME/.local/bin/cargo-deadlinks
chmod +x $HOME/.local/bin/cargo-deadlinks
curl -L "${BASE_URL}/${VERSION}/${FILE_BASE}" --output "$HOME/.local/bin/cargo-deadlinks"
chmod +x "$HOME/.local/bin/cargo-deadlinks"
cargo deadlinks --version
- name: Install mlc
Expand All @@ -167,8 +167,8 @@ jobs:
else
FILE_BASE=mlc-x86_64-linux
fi
curl -L "${BASE_URL}/v${VERSION}/${FILE_BASE}" --output $HOME/.local/bin/mlc
chmod +x $HOME/.local/bin/mlc
curl -L "${BASE_URL}/v${VERSION}/${FILE_BASE}" --output "$HOME/.local/bin/mlc"
chmod +x "$HOME/.local/bin/mlc"
mlc --version
- name: Install grcov
Expand All @@ -183,7 +183,7 @@ jobs:
FILE_BASE=grcov-x86_64-unknown-linux-gnu
fi
curl -L "${BASE_URL}/v${VERSION}/${FILE_BASE}.tar.bz2" --output /tmp/grcov.tar.bz2
tar xvf /tmp/grcov.tar.bz2 --directory=$HOME/.local/bin/
tar xvf /tmp/grcov.tar.bz2 --directory="$HOME/.local/bin/"
grcov --version
- name: Install replayman
Expand All @@ -193,9 +193,7 @@ jobs:
- name: ${{ matrix.make.task }}
run: |
for task in ${{ matrix.make.task }} ; do
cargo make ${task}
done
cargo make ${{ matrix.make.task }}
- name: Upload lcov to codecov
if: ${{ matrix.make.install-grcov }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,10 @@ All other sections are for end-users.

- Refactor : crate/module document move to pure Markdown ([#136](https://github.com/SpringQL/SpringQL/pull/136))

### For Developers

- add `cargo-make` task for runs [actionlint](https://github.com/rhysd/actionlint)

## [v0.9.0]

### Added
Expand Down
9 changes: 9 additions & 0 deletions Makefile.toml
Expand Up @@ -124,5 +124,14 @@ cargo workspaces publish
''',
]

[tasks.actionlint]
description="lint github actions with actionlint"
script = [
'''
#!/usr/bin/env bash -eux
docker run --rm -v $(pwd):/repo --workdir /repo rhysd/actionlint:latest -color
'''
]

[tasks.lcov]
alias="coverage_grcov"

0 comments on commit 8b2cbf8

Please sign in to comment.