Skip to content

Update */Manifest.toml #1537

Update */Manifest.toml

Update */Manifest.toml #1537

Workflow file for this run

name: Check xfail
on:
pull_request:
jobs:
xfail:
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: ['^1']
fail-fast: false
name: Test xfail Julia ${{ matrix.julia-version }}
steps:
- uses: actions/checkout@v2
- name: Try to merge xfail branch
run: |
git_fetch_branch() {
refspec="refs/heads/$1:refs/remotes/origin/$1"
git fetch --unshallow origin "$refspec" || git fetch origin "$refspec"
}
set -ex
xfailbranch=xfail/"${GITHUB_HEAD_REF#refs/heads/}"
if git_fetch_branch "$xfailbranch"
then
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
git merge "origin/$xfailbranch"
else
echo "No branch named $xfailbranch"
fi
# Note: `$GITHUB_REF` contains something like "refs/pull/26/merge".
# It seems `$GITHUB_HEAD_REF` contains the correct branch name.
# See also GitHub context `github.head_ref`:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
- run: git log --graph --oneline -n10
- run: git show --no-patch --format='format:%H %T'
- run: echo $GITHUB_SHA
- run: git diff $GITHUB_SHA
- name: Check if xfail test is required
id: check-xfail-needed
run: |
xfailbranch=xfail/"${GITHUB_HEAD_REF#refs/heads/}"
if git rev-parse "refs/remotes/origin/$xfailbranch" -- > /dev/null
then
echo "::set-output name=need_xfail::yes"
else
echo "::set-output name=need_xfail::no"
fi
- name: Setup julia
if: ${{ steps.check-xfail-needed.outputs.need_xfail == 'yes' }}
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- run: julia -e 'using Pkg; pkg"add [email protected]"'
if: ${{ steps.check-xfail-needed.outputs.need_xfail == 'yes' }}
- run: julia -e 'using Run; Run.test(project = "test/environments/main", xfail = true)'
if: ${{ steps.check-xfail-needed.outputs.need_xfail == 'yes' }}
env:
JULIA_NUM_THREADS: '2'