Skip to content

Commit

Permalink
Simplify vanilla-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Sep 7, 2020
1 parent ac5f516 commit 7e44b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 55 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/vanilla-test-push.yml

This file was deleted.

36 changes: 4 additions & 32 deletions .github/workflows/vanilla-test.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,18 @@
name: Run test via Pkg.test()

on:
push:
branches:
- master
pull_request:

jobs:
vanilla-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Resolve refs
run: |
git_fetch_branch() {
refspec="refs/heads/$1:refs/remotes/origin/$1"
git fetch --unshallow origin "$refspec" || git fetch origin "$refspec"
}
echo GITHUB_HEAD_REF=${GITHUB_HEAD_REF}
echo GITHUB_BASE_REF=${GITHUB_BASE_REF}
echo
git_fetch_branch ${GITHUB_HEAD_REF}
git_fetch_branch ${GITHUB_BASE_REF}
- run: git diff --name-only "origin/${GITHUB_BASE_REF}" "origin/${GITHUB_HEAD_REF}"
- name: Check if Pkg.test() is required
id: check-project-toml
run: |
if git diff --name-only "origin/${GITHUB_BASE_REF}" "origin/${GITHUB_HEAD_REF}" | \
grep -E '^Project\.toml|test/environments/main/Project\.toml$' > \
/dev/null
then
echo "::set-output name=need_test::yes"
else
echo "::set-output name=need_test::no"
fi
- name: Show output
run: echo "${{ steps.check-project-toml.outputs.need_test }}"
- uses: julia-actions/setup-julia@v1
if: ${{ steps.check-project-toml.outputs.need_test == 'yes' }}
with:
version: 1.4
version: ^1
- uses: julia-actions/julia-buildpkg@latest
if: ${{ steps.check-project-toml.outputs.need_test == 'yes' }}
- uses: julia-actions/julia-runtest@latest
if: ${{ steps.check-project-toml.outputs.need_test == 'yes' }}
env:
JULIA_NUM_THREADS: "2"
CI: "true"

0 comments on commit 7e44b2c

Please sign in to comment.