Skip to content

.github/workflows: Update github actions #170

.github/workflows: Update github actions

.github/workflows: Update github actions #170

Workflow file for this run

## Copyright Notice
##
## Copyright (C) 2022, 2024 CentraleSupelec
##
## Author: Julien Bect <[email protected]>
## Copying Permission Statement (STK toolbox)
##
## This file is part of
##
## STK: a Small (Matlab/Octave) Toolbox for Kriging
## (https://github.com/stk-kriging/stk/)
##
## STK is free software: you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation, either version 3 of the License, or (at your
## option) any later version.
##
## STK is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
## License for more details.
##
## You should have received a copy of the GNU General Public License
## along with STK. If not, see <http://www.gnu.org/licenses/>.
## Copying Permission Statement (this file)
##
## To the extent possible under law, Julien Bect has waived all copy-
## right and related or neighboring rights to run-linter.yml. This work
## is published from France.
##
## License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
name: run-linter
on: [push, pull_request]
env:
TEST_SCRIPT: >
cd ('./admin');
[m, b_ok] = stk_mlint_all ();
cd ('..');
writetable (struct2table (m), 'stk_mlint_all.csv');
if ~ b_ok, error ('linter error'); end
## The following actions are used:
## * https://github.com/actions/checkout v4
## * https://github.com/actions/download-artifact v4
## * https://github.com/matlab-actions/setup-matlab v2
## * https://github.com/matlab-actions/run-command v2
jobs:
run-linter-matlab:
# Apparently only Ubuntu workers support MATLAB actions for now
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: latest
- name: Run test script
uses: matlab-actions/run-command@v2
with:
command: ${{ env.TEST_SCRIPT }}
- name: "Upload mlint result (CSV file)"
uses: actions/upload-artifact@v4
with:
name: stk_mlint_all-${{ matrix.release }}
path: stk_mlint_all.csv