File tree Expand file tree Collapse file tree 4 files changed +87
-26
lines changed Expand file tree Collapse file tree 4 files changed +87
-26
lines changed Original file line number Diff line number Diff line change 11name : 🌌 Test Build
22
3- on : [pull_request]
4-
5- # Make sure jobs cannot overlap (e.g. one from push and one from schedule).
6- concurrency :
7- group : pr-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-ci
8- cancel-in-progress : true
3+ on :
4+ workflow_call :
95
106jobs :
117 build :
128 name : Build sources from the PR branch
139 runs-on : ubuntu-latest
1410
1511 steps :
16- - name : Checkout
17- uses : actions/checkout@v4
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
15+ # Configure the build environment.
1816
19- # Configure the build environment.
17+ - name : Install Ruby 3.1
18+ uses : ruby/setup-ruby@v1
19+ with :
20+ ruby-version : " 3.1"
21+ # Runs 'bundle install' and caches installed gems automatically
22+ bundler-cache : true
2023
21- - name : Install Ruby 3.1
22- uses : ruby/setup-ruby@v1
23- with :
24- ruby-version : ' 3.1'
25- # Runs 'bundle install' and caches installed gems automatically
26- bundler-cache : true
24+ - name : Install Minify
25+ run : sudo apt-get update && sudo apt-get install minify
2726
28- - name : Install Minify
29- run : sudo apt-get update && sudo apt-get install minify
27+ # Build the website.
3028
31- # Build the website.
29+ - name : Build the static website
30+ run : bundle exec jekyll build
3231
33- - name : Build the static website
34- run : bundle exec jekyll build
32+ # Upload resulting "_site" directory as artifact
3533
36- # Upload resulting "_site" directory as artifact
37-
38- - uses : actions/upload-artifact@v4
39- with :
40- name : site
41- path : _site/
34+ - uses : actions/upload-artifact@v4
35+ with :
36+ name : site
37+ path : _site/
Original file line number Diff line number Diff line change 1+ name : 🔗 GHA
2+ on : [push, pull_request, merge_group]
3+
4+ concurrency :
5+ group : ${{ github.workflow }}|${{ github.ref_name }}
6+ cancel-in-progress : true
7+
8+ jobs :
9+ # First stage: Only static checks, fast and prevent expensive builds from running.
10+
11+ static-checks :
12+ if : " !vars.DISABLE_GODOT_CI"
13+ name : 📊 Static checks
14+ uses : ./.github/workflows/static_checks.yml
15+
16+ # Second stage: test build the PR
17+ test-build :
18+ name : 🌌 Test Build
19+ needs : static-checks
20+ uses : ./.github/workflows/build-pr.yml
Original file line number Diff line number Diff line change 1+ name : 📊 Static Checks
2+ on :
3+ workflow_call :
4+
5+ jobs :
6+ static-checks :
7+ name : Code style and file formatting
8+ runs-on : ubuntu-24.04
9+ timeout-minutes : 30
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+
14+ - name : Get changed files
15+ env :
16+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
17+ run : |
18+ if [ "${{ github.event_name }}" == "pull_request" ]; then
19+ files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
20+ elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
21+ files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
22+ fi
23+ echo "$files" >> changed.txt
24+ cat changed.txt
25+ files=$(echo "$files" | grep -v 'thirdparty' | xargs -I {} sh -c 'echo "\"./{}\""' | tr '\n' ' ')
26+ echo "CHANGED_FILES=$files" >> $GITHUB_ENV
27+
28+ - name : pre-commit checks
29+ uses :
pre-commit/[email protected] 30+ with :
31+ extra_args : --files ${{ env.CHANGED_FILES }}
Original file line number Diff line number Diff line change 1+ default_language_version :
2+ python : python3
3+
4+ exclude : |
5+ ^(
6+
7+ )$
8+
9+ repos :
10+ - repo : https://github.com/codespell-project/codespell
11+ rev : v2.3.0
12+ hooks :
13+ - id : codespell
14+ additional_dependencies : [tomli]
You can’t perform that action at this time.
0 commit comments