4141 push :
4242 branches : [main, master]
4343
44- name : NetLogo Check
44+ name : NetLogo check
4545permissions : read-all
4646
4747jobs :
4848 check-netlogo :
4949 name : Check NetLogo models
5050 runs-on : ubuntu-latest
5151 env :
52- GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
52+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5353 steps :
5454 - name : Check out repository
5555 uses : actions/checkout@v4
8282 name : Run experiments
8383 runs-on : ubuntu-latest
8484 env :
85- GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
85+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8686 steps :
8787 - name : Checkout Repository
8888 uses : actions/checkout@v4
@@ -91,20 +91,25 @@ jobs:
9191 uses : danielvartan/logoactions/setup-netlogo@v1
9292
9393 - name : Create artifacts directory
94+ id : artifacts-dir
9495 run : |
9596 # Create artifacts directory
9697
97- mkdir -p '/tmp/artifacts'
98+ artifacts_dir="${RUNNER_TEMP}/artifacts"
99+ mkdir -p "${artifacts_dir}"
100+
101+ echo "path=${artifacts_dir}" >> "${GITHUB_OUTPUT}"
98102 shell : bash
99103
100104 - name : Run experiment
101105 run : |
102106 # Run experiment
103107
104- model_dir="$NETLOGO_HOME/models/Sample Models/Biology"
108+ artifacts_dir="${{ steps.artifacts-dir.outputs.path }}"
109+ model_dir="${NETLOGO_HOME}/models/Sample Models/Biology"
105110 model_file='Wolf Sheep Predation.nlogox'
106111 experiment_name='Wolf Sheep Crossing'
107- table_file='/tmp/artifacts/ experiment-table.csv'
112+ table_file="${artifacts_dir}/ experiment-table.csv"
108113
109114 netlogo \
110115 --headless \
@@ -115,11 +120,11 @@ jobs:
115120 cat "${table_file}"
116121 shell : bash
117122
118- - name : Upload artifact
123+ - name : Upload artifacts
119124 uses : actions/upload-artifact@v4
120125 with :
121- name : experiment -output
122- path : ' /tmp/ artifacts/ '
126+ name : experiments -output
127+ path : ${{ steps. artifacts-dir.outputs.path }}
123128 retention-days : 90
124129` ` `
125130
@@ -144,7 +149,7 @@ jobs:
144149 runs-on: ubuntu-latest
145150 name: Run experiments
146151 env:
147- GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
152+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148153 permissions:
149154 contents: write
150155 pages: write
@@ -162,6 +167,7 @@ jobs:
162167 uses: quarto-dev/quarto-actions/setup@v2
163168
164169 - name: Install system dependencies
170+ if: runner.os == 'Linux'
165171 run: |
166172 # Install system dependencies
167173
@@ -176,6 +182,8 @@ jobs:
176182 run: |
177183 # Install R dependencies
178184
185+ options(repos=c(CRAN="https://cloud.r-project.org"))
186+
179187 install.packages(
180188 c(
181189 "rmarkdown",
@@ -244,7 +252,7 @@ You must also set the `GH_TOKEN` environment variable to enable authenticated Gi
244252
245253` ` ` yaml
246254env:
247- GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
255+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
248256` ` `
249257
250258This will make NetLogo available for use in subsequent steps.
@@ -312,7 +320,7 @@ You must also set the `GH_TOKEN` environment variable to enable authenticated Gi
312320
313321` ` ` yaml
314322env:
315- GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
323+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
316324` ` `
317325
318326# ## Functionality
@@ -347,7 +355,7 @@ Use the `with` keyword to change the default values. Example:
347355
348356# ## Supported Platforms
349357
350- This action supports only `ubuntu -latest` runners at the moment .
358+ The runners `ubuntu-latest`, `windows-latest`, and `macos -latest` are supported. We recommend using `ubuntu-latest` whenever possible .
351359
352360# # Citation
353361
0 commit comments