Skip to content

Commit

Permalink
Merge pull request #17 from embulk/check-actions
Browse files Browse the repository at this point in the history
Check with GitHub Actions
  • Loading branch information
dmikurube authored May 8, 2024
2 parents f875fc6 + 79f12a5 commit d005b5a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check
on: [ pull_request, push ]
jobs:
check:
runs-on: ${{ matrix.os }}
# push: always run.
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-13 # OpenJDK 8 is not supported on macos-14+ (M1).
- windows-latest
steps:
- name: Set Git's core.autocrlf to false for Windows before checkout
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- name: Set up OpenJDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
cache: "gradle"

# GitHub Actions on Windows set environment variables TMP and TEMP with a legacy DOS 8.3 filename: "C:\Users\RUNNER~1\..."
# On the other hand, "embulk-input-file" expects a long filename (LFN) on Windows.
#
# The following two steps override TMP and TEMP with LFN. USERPROFILE is set with LFN fortunately.
#
# See: https://github.com/actions/virtual-environments/issues/712

- name: Override TMP to use Windows' long filename (LFN)
run: echo "TMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if: matrix.os == 'windows-latest'
- name: Override TEMP to use Windows' long filename (LFN)
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if: matrix.os == 'windows-latest'
- name: Check
run: ./gradlew --stacktrace check

0 comments on commit d005b5a

Please sign in to comment.