GTN in CodeSpaces tutorial #5416
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: "[CI] GTN Tutorial Linting" | |
concurrency: | |
group: ci-tutsli-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
paths: | |
- 'Gemfile.lock' | |
- 'topics/**' | |
- '**/tutorial*.md' | |
- '**/slides.html' | |
- '**/slides/*.html' | |
- 'learning-pathways/*' | |
- 'faqs/**' | |
- 'news/**' | |
- 'events/**' | |
- CONTRIBUTORS.yaml | |
- GRANTS.yaml | |
- ORGANISATIONS.yaml | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
persist-credentials: false | |
- uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
# BEGIN Dependencies | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}- | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Install dependencies | |
run: | | |
gem install bundler | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
pip install pyyaml | |
bundle pristine ffi | |
# END Dependencies | |
- name: Check Frontmatter | |
run: | | |
make check-diffs ACTIVATE_ENV=pwd | |
make check-frontmatter ACTIVATE_ENV=pwd | |
make check-contributors ACTIVATE_ENV=pwd | |
python bin/mergeyaml.py --nondocker > /dev/null | |
- name: Check Tutorial Formatting | |
run: | | |
find topics/ -name tutorial.md | xargs -n 1 python bin/check-broken-boxes.py | reviewdog -efm="%f:%l: %m" -filter-mode=file -reporter=github-pr-review -fail-level=any | |
bundle exec ruby bin/lint.rb --format rdjson | reviewdog -filter-mode=file -reporter=github-pr-review -f=rdjsonl -fail-level=any | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# - name: rubocop | |
# uses: reviewdog/action-rubocop@v2 | |
# with: | |
# rubocop_version: gemfile | |
# reporter: github-pr-review | |
# rubocop_flags: --except Layout/LineLength,Lint/RedundantCopDisableDirective | |
# fail_on_error: true |