4141 - name : Build scratch-vm for smalruby
4242 run : npm run setup-scratch-vm
4343 - name : Lint
44+ if : |
45+ (!(
46+ github.ref == 'refs/heads/develop' ||
47+ github.ref == 'refs/heads/master' ||
48+ github.ref == 'refs/heads/main'
49+ ))
4450 run : npm run test:lint
4551 - name : Run Unit Tests
52+ if : |
53+ (!(
54+ github.ref == 'refs/heads/develop' ||
55+ github.ref == 'refs/heads/master' ||
56+ github.ref == 'refs/heads/main'
57+ ))
4658 env :
4759 JEST_JUNIT_OUTPUT_NAME : unit-results.xml
4860 JEST_JUNIT_OUTPUT_DIR : test-results/unit
@@ -62,11 +74,24 @@ jobs:
6274 with :
6375 name : dist-output
6476 path : ./dist
65- - run : |
77+ - name : Check installed browser
78+ if : |
79+ (!(
80+ github.ref == 'refs/heads/develop' ||
81+ github.ref == 'refs/heads/master' ||
82+ github.ref == 'refs/heads/main'
83+ ))
84+ run : |
6685 for F in chrome chromium chromedriver; do
6786 which $F && $F --version || echo Not found: $F
6887 done
6988 - name : Run Integration Tests
89+ if : |
90+ (!(
91+ github.ref == 'refs/heads/develop' ||
92+ github.ref == 'refs/heads/master' ||
93+ github.ref == 'refs/heads/main'
94+ ))
7095 env :
7196 JEST_JUNIT_OUTPUT_NAME : integration-results.xml
7297 JEST_JUNIT_OUTPUT_DIR : test-results/integration
99124 external_repository : smalruby/smalruby.app
100125 - name : Set branch name
101126 id : branch
102- run : echo "BRANCH_NAME=${GITHUB_REF##*/ }" >> $GITHUB_OUTPUT
127+ run : echo "BRANCH_NAME=${{ github.head_ref || github.ref_name } }" >> $GITHUB_OUTPUT
103128 - name : Deploy playground to GitHub Pages for branch
104129 if : |
105130 (!(
0 commit comments