Add new tests for seven modules. Include GH workflow. #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
git config --global init.defaultBranch main | |
git init | |
git config --local user.name GenXProject | |
git config --local user.email "[email protected]" | |
git remote add testlog https://[email protected]/GenXProject/GenX-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.LOG_TOKEN }} | |
- 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 |