Skip to content

Commit

Permalink
move scripts to top-level folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Walavouchey committed Apr 25, 2022
1 parent 1d2f0c0 commit 798a37b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

# Fixes languages listing on GitHub
.remarkrc.js linguist-detectable=false
scripts/**/* linguist-detectable=false
news/**/*.md linguist-detectable
wiki/**/*.md linguist-detectable
12 changes: 6 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ jobs:
# set up sparse checkout
git sparse-checkout init
git sparse-checkout set '**/*.md' '**/.remark*' '**/*.json' '**/*.yaml' '.github/scripts' 'wiki/**/*'
git sparse-checkout set '**/*.md' '**/.remark*' '**/*.json' '**/*.yaml' 'scripts' 'wiki/**/*'
# fetch the merge commit ref
git -c protocol.version=2 fetch --no-tags --prune --progress --depth=2 origin +${GITHUB_SHA}:refs/remotes/origin/${BRANCH}
git checkout --progress --force -B $BRANCH refs/remotes/origin/$BRANCH
- name: inspect binary file sizes
shell: bash
run: bash .github/scripts/ci/inspect_binary_file_sizes.sh ${{ github.sha }} ${{ github.sha }}
run: bash scripts/ci/inspect_binary_file_sizes.sh ${{ github.sha }} ${{ github.sha }}
- name: setup node
uses: actions/setup-node@v1

- name: install remark
run: npm install

- name: run remark on changed files
run: bash .github/scripts/ci/run_remark.sh ${{ github.sha }} ${{ github.sha }}
run: bash scripts/ci/run_remark.sh ${{ github.sha }} ${{ github.sha }}

- name: setup Python
uses: actions/setup-python@v2
Expand All @@ -59,7 +59,7 @@ jobs:
- name: setup and run yamllint on .yaml and .md files
run: |
pip install yamllint
python .github/scripts/ci/run_yamllint.py --config .yamllint.yaml
python scripts/ci/run_yamllint.py --config .yamllint.yaml
- name: find broken wikilinks
shell: bash
Expand All @@ -72,7 +72,7 @@ jobs:
fi
ARTICLES=$( git diff --diff-filter=d --name-only ${{ github.sha }}^ ${{ github.sha }} "wiki/**/*.md" "news/*.md" )
python .github/scripts/ci/find_broken_wikilinks.py --target $ARTICLES
python scripts/ci/find_broken_wikilinks.py --target $ARTICLES
- name: check if translations are marked as outdated
shell: bash
Expand All @@ -85,4 +85,4 @@ jobs:
fi
# get the first commit of the branch associated with the PR; GitHub's ubuntu-latest has curl/jq: https://github.com/actions/virtual-environments
FIRST_PR_COMMIT_HASH=$( curl -sS ${{ github.event.pull_request.commits_url }}?per_page=1 | jq -r '.[0].sha' || true )
bash .github/scripts/ci/check_outdated_tags.sh ${{ github.sha }} ${{ github.sha }} $FIRST_PR_COMMIT_HASH
bash scripts/ci/check_outdated_tags.sh ${{ github.sha }} ${{ github.sha }} $FIRST_PR_COMMIT_HASH
10 changes: 5 additions & 5 deletions run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ LAST_COMMIT_HASH=$( git rev-parse HEAD )
ARTICLES=$( git diff --diff-filter=d --name-only ${FIRST_COMMIT_HASH}^ ${LAST_COMMIT_HASH} "wiki/**/*.md" "news/*.md" )

printf -- "--- Binary file size check ---\n\n"
bash .github/scripts/ci/inspect_binary_file_sizes.sh ${FIRST_COMMIT_HASH} ${LAST_COMMIT_HASH}
bash scripts/ci/inspect_binary_file_sizes.sh ${FIRST_COMMIT_HASH} ${LAST_COMMIT_HASH}

printf -- "\n--- Run remark ---\n\n"
bash .github/scripts/ci/run_remark.sh ${FIRST_COMMIT_HASH} ${LAST_COMMIT_HASH}
bash scripts/ci/run_remark.sh ${FIRST_COMMIT_HASH} ${LAST_COMMIT_HASH}

printf -- "\n--- Run yamllint ---\n\n"
python3 .github/scripts/ci/run_yamllint.py --config .yamllint.yaml
python3 scripts/ci/run_yamllint.py --config .yamllint.yaml

printf -- "\n--- Broken wikilink check ---\n\n"
python3 .github/scripts/ci/find_broken_wikilinks.py --target ${ARTICLES}
python3 scripts/ci/find_broken_wikilinks.py --target ${ARTICLES}

printf -- "\n--- Outdated tag check ---\n\n"
bash .github/scripts/ci/check_outdated_tags.sh ${FIRST_COMMIT_HASH} ${LAST_COMMIT_HASH}
bash scripts/ci/check_outdated_tags.sh ${FIRST_COMMIT_HASH} ${LAST_COMMIT_HASH}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 798a37b

Please sign in to comment.