GitHub Actions: use expression syntax

Per GitHub documentation:

  When you use expressions in an if conditional, you may omit the
  expression syntax (${{ }}) because GitHub automatically evaluates
  the if conditional as an expression, unless the expression contains
  any operators. If the expression contains any operators, the
  expression must be contained within ${{ }} to explicitly mark it for
  evaluation.

https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
This commit is contained in:
Sajith Sasidharan 2021-04-26 12:17:25 -04:00
parent f4b8780ba7
commit 106976e8cc

View File

@ -35,7 +35,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os != 'windows-latest' && matrix.python-version != '2.7'
if: ${{ matrix.os != 'windows-latest' && matrix.python-version != '2.7' }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
@ -45,7 +45,7 @@ jobs:
# vcpython27 compiler, building a netifaces wheel is not an
# option anymore, so let us test on 32-bit Windows.
- name: Set up Python ${{ matrix.python-version }} [Windows x86]
if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
if: ${{ matrix.os == 'windows-latest' && matrix.python-version == '2.7' }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
@ -187,14 +187,14 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os != 'windows-latest' && matrix.python-version != '2.7'
if: ${{ matrix.os != 'windows-latest' && matrix.python-version != '2.7' }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# See this step under coverage job.
- name: Set up Python ${{ matrix.python-version }} [Windows x86]
if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
if: ${{ matrix.os == 'windows-latest' && matrix.python-version == '2.7' }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
@ -251,14 +251,14 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
if: matrix.os != 'windows-latest' && matrix.python-version != '2.7'
if: ${{ matrix.os != 'windows-latest' && matrix.python-version != '2.7' }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# See this step under coverage job.
- name: Set up Python ${{ matrix.python-version }} [Windows x86]
if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
if: ${{ matrix.os == 'windows-latest' && matrix.python-version == '2.7' }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}