Skip to content

Create release 1.0.0 #1

Create release 1.0.0

Create release 1.0.0 #1

# Copyright (C) 2024 Mitsubishi Electric Research Laboratories (MERL)
#
# SPDX-License-Identifier: Apache-2.0
name: Static code checks
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- '**'
tags-ignore:
- '**'
env:
LICENSE: Apache-2.0
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@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }} # '0' to check full history
- name: Set up environment
run: git config user.email [email protected]
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10'
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/[email protected]
- 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: requirements.txt
license: ${{ env.LICENSE }}