Skip to content

update year formatting #1

update year formatting

update year formatting #1

# Copyright (C) 2023 Mitsubishi Electric Research Laboratories (MERL)
#
# SPDX-License-Identifier: MIT
name: Static code checks
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- '**'
tags-ignore:
- '**'
env:
LICENSE: MIT
FETCH_DEPTH: 1
FULL_HISTORY: 0
SKIP_WORD_PRESENCE_CHECK: 0
jobs:
static-code-check:
if: endsWith(github.event.repository.name, 'private')
name: Run static code checks
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Setup history
if: github.ref == 'refs/heads/oss'
run: |
echo "FETCH_DEPTH=0" >> $GITHUB_ENV
echo "FULL_HISTORY=1" >> $GITHUB_ENV
- name: Setup version
if: github.ref == 'refs/heads/melco'
run: |
echo "SKIP_WORD_PRESENCE_CHECK=1" >> $GITHUB_ENV
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: ${{ env.FETCH_DEPTH }} # '0' to check full history
- name: Set up environment
run: git config user.email github-bot@merl.com
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3
cache: 'pip'
cache-dependency-path: '.github/workflows/requirements-dev.txt'
- name: Install python packages
run: pip install -r .github/workflows/requirements-dev.txt
- name: Ensure lint and pre-commit steps have been run
uses: pre-commit/action@v3.0.0
- name: Check files
uses: merl-oss-private/merl-file-check-action@v1
with:
license: ${{ env.LICENSE }}
full-history: ${{ env.FULL_HISTORY }} # If true, use fetch-depth 0 above
skip-word-presence-check: ${{ env.SKIP_WORD_PRESENCE_CHECK }}
- name: Check license compatibility
if: github.ref != 'refs/heads/melco'
uses: merl-oss-private/merl_license_compatibility_checker@v1
with:
input-filename: environment.yaml
license: ${{ env.LICENSE }}