-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github actions, run CI on macos and windows as well
- ignore whitespace and blank lines when diffing (matches digesting logic)
- Loading branch information
1 parent
0e70c00
commit 6789cd6
Showing
5 changed files
with
116 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: CI Build | ||
on: | ||
pull_request: | ||
branches: [ 'master' ] | ||
|
||
jobs: | ||
scalafmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: coursier/[email protected] | ||
with: | ||
apps: scalafmt | ||
|
||
- uses: coursier/cache-action@v6 | ||
|
||
- name: Scalafmt | ||
run: scalafmt -c .scalafmt.conf --check | ||
|
||
build: | ||
name: CI Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
- os: macos-latest | ||
- os: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: coursier/cache-action@v6 | ||
|
||
- uses: coursier/[email protected] | ||
with: | ||
jvm: adopt:11 | ||
apps: sbt | ||
|
||
- name: Get tests folder sha | ||
id: get-tests-folder-sha | ||
run: | | ||
echo "::set-output name=sha::$(git ls-tree HEAD tests --object-only)" | ||
- uses: actions/cache@v3 | ||
with: | ||
path: test-cache | ||
key: ${{ runner.os }}-${{ steps.get-tests-folder-sha.outputs.sha }}-test-cache-v1 | ||
|
||
- name: Build and test | ||
run: sbt test | ||
env: | ||
CI: true | ||
CI_TEST_CACHE: ../test-cache | ||
|
||
# commented out while I figure out how to speed it up or when to run it | ||
# sbt-scripted-tests: | ||
# name: Run sbt scripted tests | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 25 | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 0 | ||
# | ||
# - uses: coursier/cache-action@v6 | ||
# | ||
# # cache artifacts within same date. should help a bit with the compile time | ||
# - name: Get timestamp | ||
# id: get-date | ||
# run: | | ||
# echo "::set-output name=time::$(date +%yy-%m-%d)" | ||
# | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ~/.ivy2/local/org.scalablytyped | ||
# key: scripted-v1-${{ steps.get-date.outputs.time }} | ||
# | ||
# - uses: coursier/[email protected] | ||
# with: | ||
# jvm: adopt:11 | ||
# apps: sbt | ||
# | ||
# - name: Run scripted | ||
# run: sbt scripted |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# note that the proper release is made manually with the release script because it's | ||
# a heavy operation (builds all demo repos) | ||
# that's why we don't trigger on tag | ||
name: Release snapshot | ||
on: | ||
push: | ||
branches: [ 'master' ] | ||
jobs: | ||
release-snapshot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: coursier/cache-action@v6 | ||
- uses: coursier/[email protected] | ||
apps: sbt | ||
|
||
- name: publish snapshot | ||
run: sbt ci-release |
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