JanneKiiskila PR checker #249
Workflow file for this run
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
name: PR-check | |
run-name: ${{ github.actor }} PR checker | |
on: | |
push: | |
workflow_dispatch: | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: pe-utils-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
run-shellcheck-and-scripts: | |
runs-on: [ "self-hosted", "client" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get update && sudo apt-get install -y shellcheck | |
- run: shellcheck --version | |
- name: Shellcheck fw-tools/edge-testnet | |
run: shellcheck fw-tools/edge-testnet | |
- name: Run edge-testnet | |
run: | | |
fw-tools/edge-testnet -e | |
- run: shellcheck edge-info/edge-info | |
- run: cat /etc/os-release | |
- run: edge-info/edge-info | |
run-identity-tool-tests: | |
runs-on: [ "self-hosted", "client" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run identity-tools tests | |
run: | | |
cd identity-tools/test-cases | |
./test.sh | |
- name: Create one developer identity-tools | |
run: | | |
cd identity-tools/developer_identity | |
./create-dev-identity.sh -h | |
./create-dev-identity.sh -d -w CI-test | |
run-pysh-check: | |
runs-on: [ "self-hosted", "client" ] | |
env: | |
PA_TOKEN: ${{ secrets.ACCESS_TOKEN }} # IzumaBOT Access Token | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'PelionIoT/scripts-internal' | |
token: ${{ secrets.ACCESS_TOKEN }} | |
path: 'pe-utils/scripts-internal' | |
# Install pyshcheck tooling | |
- run: sudo apt-get update && sudo apt-get install -y pycodestyle pydocstyle black | |
- run: echo "." >scripts-internal/.nopyshcheck | |
- run: .github/workflows/pysh-checker.sh ${{ github.event.repository.default_branch }} ${{ github.ref_name }} | |
run-edge-testnet: | |
runs-on: [ "self-hosted", "client" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run edge-testnet | |
run: fw-tools/edge-testnet | |
- name: Run edge-testnet as fake snap | |
run: SNAP=snap fw-tools/edge-testnet | |
- name: Check -h works OK. | |
run: | | |
if ! fw-tools/edge-testnet -h; then | |
echo "Failed to run edge-testnet -h" | |
exit 1 | |
fi | |
- name: Check if it works with a custom domain | |
run: | | |
if ! fw-tools/edge-testnet --domain -pr-tester.pdm-sandbox.io -s --skip443 --skiptcpping; then | |
echo "Failed to run edge-testnet -d example.com" | |
exit 1 | |
fi | |
- name: Check if it works with a custom domain & SNAP env defined | |
run: | | |
if ! SNAP=snap fw-tools/edge-testnet --domain -pr-tester.pdm-sandbox.io -s --skip443 --skiptcpping; then | |
echo "Failed to run edge-testnet -d example.com with SNAP env defined" | |
exit 1 | |
fi | |
- name: Check if it works with expected failures | |
run: | | |
fw-tools/edge-testnet --domain -pr-tester.pdm-sandbox.io -s --skiptcpping > expect-some-fails.txt || true | |
grep "Some tests failed." expect-some-fails.txt | |
versions-check: | |
runs-on: [ "self-hosted", "client" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./check_versions.sh | |
run-edge-info: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
cd edge-info | |
./edge-info | |
out=$(./edge-info) | |
# If we find \u* anything in the output, | |
# likely a echo -e mistake | |
if echo "$out" | grep -q "\\\\u"; then | |
echo "The string contains \\u" | |
echo "Likely a echo -e mistake" | |
exit 1 | |
fi |