-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (71 loc) · 3.73 KB
/
simulation_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on: [push,pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.10.5']
julia-arch: [x86] #[x64, x86]
os: [ubuntu-latest, macOS-latest] #[ubuntu-latest, macOS-latest]
# exclude:
# - os: macOS-latest
# julia-arch: x86
steps:
- run: echo "🎉 This job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Julia env
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
# arch: ${{ matrix.julia-arch }}
- name: List files in the repository
run: |
ls ${{ github.workspace }}
# - uses: julia-actions/julia-buildpkg@latest
- name: install dependencies
run: julia --project=environment -e 'using Pkg;Pkg.instantiate()'
#uses: julia-actions/julia-buildpkg@v1
# - uses: julia-actions/julia-runtest@latest
###############################################
#SIMULATIONS
##############################################
- name: Running dummy simulation and putting into scripts/out file
run: |
julia --project=environment --code-coverage=user ${{ github.workspace }}/simulation/main.jl -i ${{ github.workspace }}/tests/data_test/par_test.ini > ${{ github.workspace }}/tests/out
# - name: Running dummy simulation with the flag for using time macro
# run: |
# julia --project=environment --code-coverage=user ${{ github.workspace }}/simulation/main.jl -i ${{ github.workspace }}/tests/data_test/par_test0.ini --speed_test
# - name: Running dummy simulation for creating and covering ini file
# run: |
# julia --project=environment --code-coverage=user ${{ github.workspace }}/simulation/main.jl -i ${{ github.workspace }}/tests/data_test/par_test0.ini
# - name: Running dummy for single sim, with delay, and not simulating
# run: |
# julia --project=environment --code-coverage=user ${{ github.workspace }}/simulation/main.jl --inject_delays -i ${{ github.workspace }}/tests/data_test/par_test2.ini
# - name: Running dummy MULTIPLE simulation
# run: |
# julia --project=environment --code-coverage=user ${{ github.workspace }}/simulation/main.jl --multi_simulation --inject_delays -i ${{ github.workspace }}/tests/data_test/par_test1.ini
# - name: Running dummy MULTIPLE simulation without injecting delays :/
# run: |
# julia --project=environment --code-coverage=user ${{ github.workspace }}/simulation/main.jl --multi_simulation -i ${{ github.workspace }}/tests/data_test/par_test1.ini
#############################################
#TESTS
#############################################
- name: Running TEST over the simulation
run: |
julia --project=environment --code-coverage=user ${{ github.workspace }}/tests/simulation_test.jl
# - name: send results to codecov.io, watching at simulation folder
# run: julia --project=environment -e 'using Pkg; using Coverage; Codecov.submit(process_folder("simulation"))'
# - name: julia-actions/julia-processcoverage@v1
# uses: julia-actions/julia-processcoverage@v1
# with:
# directories: simulation
#
# - name: codecov actions
# uses: codecov/codecov-action@v2
# with:
# file: lcov.info
# token: ${{ secrets.CODECOV_TOKEN }}