Skip to content

Commit

Permalink
Merge pull request #10961 from SethTisue/get-travis-ci-out-of-pr-vali…
Browse files Browse the repository at this point in the history
…dation

no more Travis-CI for PR validation, use GitHub Actions
  • Loading branch information
SethTisue authored Dec 20, 2024
2 parents 7824099 + 9761bae commit b045381
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
- name: Test
run: |
STARR=`cat buildcharacter.properties | grep ^maven.version.number | cut -d= -f2` && echo $STARR
sbt -Dstarr.version=$STARR setupValidateTest test:compile info testAll
sbt -Dstarr.version=$STARR setupValidateTest Test/compile info testAll
30 changes: 30 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR validation
on:
pull_request:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
cache: sbt
- name: Setup SBT
uses: sbt/setup-sbt@v1
# "mini" bootstrap for PR validation
# "mini" in these senses:
# - it doesn't use the complicated legacy scripts.
# - it doesn't publish to scala-pr-validation-snapshots
# (because we need secrets for that and PRs from forks can't have secrets)
# it is still a true bootstrap.
- name: Stage 1
run: sbt -warn setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
- name: Stage 2
run: |
STARR=`cat buildcharacter.properties | grep ^maven.version.number | cut -d= -f2` && echo $STARR
sbt -Dstarr.version=$STARR -warn setupValidateTest Test/compile info testAll
19 changes: 3 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,9 @@ jobs:
- buildQuick
- triggerScalaDist

# pull request validation (w/ mini-bootstrap)
# "mini" in these senses:
# - it doesn't use the complicated legacy scripts.
# - it doesn't publish to scala-pr-validation-snapshots
# (because we need secrets for that and Travis-CI doesn't give PR jobs access to secrets)
# it is still a true bootstrap.
- stage: build
name: "JDK 8 pr validation"
if: type = pull_request
script:
- sbt -warn setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
- STARR=`cat buildcharacter.properties | grep ^maven.version.number | cut -d= -f2` && echo $STARR
- sbt -Dstarr.version=$STARR -warn setupValidateTest test:compile info testAll

# build the spec using jekyll
- stage: build
if: type != pull_request
dist: focal
language: ruby
# ruby 3.x is default, need to upgrade jekyll. using 2.7 for now.
Expand All @@ -56,10 +43,10 @@ jobs:
- bundler --version
- bundle install
script:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then (cd admin && ./init.sh); fi'
- '(cd admin && ./init.sh)'
- bundle exec jekyll build -s spec/ -d build/spec
after_success:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./scripts/travis-publish-spec.sh; fi'
- ./scripts/travis-publish-spec.sh

env:
global:
Expand Down

0 comments on commit b045381

Please sign in to comment.