Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Add copyright header to test_system.py, add GH workflow check for that.
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinrich Kuttler committed Sep 20, 2021
1 parent a7b6532 commit b573f56
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ on:


jobs:
test_license:
name: Check license headers
steps:
- uses: actions/checkout@v2

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

- name: Check copyright header in added files
- shell: bash
- run: |
missing=0
for file in "${{ steps.changed-files.outputs.added_files }}"; do
if ! egrep -q '(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook)' $file
echo "Missing copyright header in $file"
missing=$(expr $missing + 1)
done
exit $missing
test_repo:
name: Test on ${{ matrix.os }} w/ Py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -142,4 +162,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
...
1 change: 1 addition & 0 deletions nle/tests/test_system.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) Facebook, Inc. and its affiliates.
import multiprocessing as mp

import gym
Expand Down

0 comments on commit b573f56

Please sign in to comment.