Skip to content

Commit

Permalink
Merge pull request #139 from takayahilton/add-ci-test
Browse files Browse the repository at this point in the history
Add ci of github action
  • Loading branch information
takayahilton authored Jul 8, 2022
2 parents 758248c + 0aae21b commit 57e387d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: sql-formatter CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
scala: [2.11.12, 2.12.15, 2.13.8]
project: [sql_formatterJVM, sql_formatterJS, sql_formatterNative]
coverage: [coverage]
coverageReport: [coverageReport]

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Cache node modules
uses: actions/cache@v2
with:
key: scala-dependencies
path: |
~/.ivy2/cache
~/.sbt
~/.coursier
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Run tests
env:
SCALA_VERSION: ${{ matrix.scala }}
PROJECT: ${{ matrix.project }}
COVERAGE: ${{ matrix.coverage }}
COVERAGE_REPORT: ${{ matrix.coverageReport }}
run: >
sbt ++$SCALA_VERSION check $COVERAGE $PROJECT/test $COVERAGE_REPORT
- name: Report to CodeCov
run: bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.7
sbt.version=1.6.2

0 comments on commit 57e387d

Please sign in to comment.