Skip to content

update ci.yml

update ci.yml #61

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main, develop]
tags: ['*']
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.6" # LTS (64-bit Linux)
- "1.7"
- "1.8"
- '1.9' # latest stable Julia release (Linux)
os:
- ubuntu-latest
arch:
- x64
include: # additional tests [Julia-nightly] (Linux)
- os: ubuntu-latest
version: 'nightly'
arch: x64
allow_failure: true
steps:
- uses: actions/checkout@v3
- name: Create a new branch and pull test logs from repo # only push logs if PR is not from a fork
if: ${{ ! github.event.pull_request.head.repo.fork }}
run: |
git checkout -b ${GITHUB_REF#refs/heads/}-testlogs
mkdir test/Logs; cd test/Logs
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo $SSH_KEY > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
git config --global init.defaultBranch main
git init
cat << EOF > ~/.ssh/config
Host github.com
User git
ForwardX11 no
IdentityFile ~/.ssh/id_rsa
EOF
cat ~/.ssh/id_rsa
git remote add testlog [email protected]:lbonaldo/testlog.git
git pull testlog main
if [ -d Logs_v${{ matrix.version }} ]; then
mv Logs_v${{ matrix.version }}/*.log .
else
mkdir Logs_v${{ matrix.version }}
fi
env:
LOG_TOKEN: ${{ secrets.SSH_KEY }}
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- name: Commit logs and push back to repo # only push logs if PR is not from a fork
if: ${{ ! github.event.pull_request.head.repo.fork }}
run: |
cd ${GITHUB_WORKSPACE}/test/Logs
mv *.log Logs_v${{ matrix.version }}
git add -f Logs_v${{ matrix.version }}
git commit -m "Update test logs for Julia v${{ matrix.version }}"
git pull --rebase testlog main # pull again to avoid conflicts from other versions
git push testlog main
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info