Skip to content

Commit

Permalink
Format YAML in GH workflows (#1367)
Browse files Browse the repository at this point in the history
Apply consistent formatting to YAML files in GitHub workflows.
Using the defaults for yamllint, i.e., 2 spaces and indenting lists.
Applied using Mega-Linter (prettier, yamllint).
  • Loading branch information
wenzeslaus committed Feb 19, 2021
1 parent 80bcf7a commit 567fa06
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 255 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Python Black Formatting

on:
- push
- pull_request
- push
- pull_request

jobs:

run-black:
name: ${{ matrix.directory }}
runs-on: ubuntu-20.04
Expand All @@ -19,20 +18,19 @@ jobs:
fail-fast: false

steps:

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install
run: |
python -m pip install --upgrade pip
pip install black==20.8b1
- name: Run Black
run: |
cd ${{ matrix.directory }}
black --check --diff .
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install
run: |
python -m pip install --upgrade pip
pip install black==20.8b1
- name: Run Black
run: |
cd ${{ matrix.directory }}
black --check --diff .
84 changes: 42 additions & 42 deletions .github/workflows/centos.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CentOS

on:
- push
- pull_request
- push
- pull_request

jobs:
build:
Expand All @@ -13,46 +13,46 @@ jobs:
strategy:
matrix:
os:
- centos:7
- centos:7
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
yum install -y epel-release
yum install -y wget gawk
yum install -y $(cat .github/workflows/yum.txt)
- name: Install conda
run: |
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
chmod u+x Anaconda3-2020.02-Linux-x86_64.sh
./Anaconda3-2020.02-Linux-x86_64.sh -b
- name: Set variables with conda executable and activate
run: |
echo "CONDA=/github/home/anaconda3/bin/conda" >> $GITHUB_ENV
echo "CONDA_ACTIVATE=/github/home/anaconda3/bin/activate" >> $GITHUB_ENV
- name: Get GRASS GIS runtime conda dependencies
run: |
source $CONDA_ACTIVATE
$CONDA install -y -c anaconda numpy wxpython python-dateutil ply termcolor
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
run: |
source $CONDA_ACTIVATE
.github/workflows/build_centos.sh $HOME/install
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Test executing of the grass command
run: |
source $CONDA_ACTIVATE
.github/workflows/test_simple.sh
- uses: actions/checkout@v2
- name: Get dependencies
run: |
yum install -y epel-release
yum install -y wget gawk
yum install -y $(cat .github/workflows/yum.txt)
- name: Install conda
run: |
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
chmod u+x Anaconda3-2020.02-Linux-x86_64.sh
./Anaconda3-2020.02-Linux-x86_64.sh -b
- name: Set variables with conda executable and activate
run: |
echo "CONDA=/github/home/anaconda3/bin/conda" >> $GITHUB_ENV
echo "CONDA_ACTIVATE=/github/home/anaconda3/bin/activate" >> $GITHUB_ENV
- name: Get GRASS GIS runtime conda dependencies
run: |
source $CONDA_ACTIVATE
$CONDA install -y -c anaconda numpy wxpython python-dateutil ply termcolor
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
run: |
source $CONDA_ACTIVATE
.github/workflows/build_centos.sh $HOME/install
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Test executing of the grass command
run: |
source $CONDA_ACTIVATE
.github/workflows/test_simple.sh
110 changes: 55 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI

on:
- push
- pull_request
- push
- pull_request

jobs:
build:
Expand All @@ -12,29 +12,29 @@ jobs:
strategy:
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-18.04
- ubuntu-20.04
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Ensure one core for compilation
run: |
echo "MAKEFLAGS=-j1" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
run: .github/workflows/build.sh $HOME/install
- uses: actions/checkout@v2
- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Ensure one core for compilation
run: |
echo "MAKEFLAGS=-j1" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
run: .github/workflows/build.sh $HOME/install

test:
name: ${{ matrix.os }} tests
Expand All @@ -43,40 +43,40 @@ jobs:
strategy:
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-18.04
- ubuntu-20.04
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
run: .github/workflows/build.sh $HOME/install
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh
- uses: actions/checkout@v2
- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
run: .github/workflows/build.sh $HOME/install
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh

- name: Make HTML test report available
uses: actions/upload-artifact@v2
with:
name: testreport-${{ matrix.os }}
path: testreport
retention-days: 3
- name: Make HTML test report available
uses: actions/upload-artifact@v2
with:
name: testreport-${{ matrix.os }}
path: testreport
retention-days: 3
72 changes: 37 additions & 35 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: "CodeQL"

on:
push:
branches: [ master, releasebranch_7_8]
branches: [master, releasebranch_7_8]
pull_request:
branches: [ master ]
branches: [master]
schedule:
# Check every Saturday at 18:36
- cron: '36 18 * * 6'
- cron: "36 18 * * 6"

jobs:
analyze:
Expand All @@ -18,37 +18,39 @@ jobs:
fail-fast: false
matrix:
# C is included in cpp, no separate C language available on CodeQL
language: [ 'cpp', 'python' ]
language:
- cpp
- python

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
env:
CFLAGS: "-std=gnu11"
CXXFLAGS: "-std=c++11"
run: .github/workflows/build.sh $HOME/install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Set LD_LIBRARY_PATH for compilation
run: |
echo "LD_LIBRARY_PATH=$HOME/install/lib" >> $GITHUB_ENV
- name: Build
env:
CFLAGS: "-std=gnu11"
CXXFLAGS: "-std=c++11"
run: .github/workflows/build.sh $HOME/install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

0 comments on commit 567fa06

Please sign in to comment.