Skip to content

Source extractor tutorial #8495

Source extractor tutorial

Source extractor tutorial #8495

Workflow file for this run

name: "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: 1000
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
if: always()
run: |
mkdir -p ./pr
echo "export CI_REPO_OWNER=galaxyproject" > pr/env.sh
echo "export CI_REPO_NAME=training-material" >> pr/env.sh
pr_num=$(echo "$GITHUB_REF_NAME" | sed 's|/.*||g')
echo "export CI_PULL_REQUEST=${pr_num}" >> pr/env.sh
echo "export CI_COMMIT=${{ github.event.pull_request.head.sha }}" >> pr/env.sh
cat pr/env.sh
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=error | tee ./pr/reviewdog.txt
set -o pipefail
bundle exec ruby bin/lint.rb --format rdjson | reviewdog -filter-mode=file -f=rdjsonl -reporter=github-pr-review -fail-level=error | tee ./pr/reviewdog.json
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: reviewdog
path: pr/
# - 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