-
Notifications
You must be signed in to change notification settings - Fork 190
61 lines (58 loc) · 2.04 KB
/
ci-auto-commit-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: SMARTS CI Auto Commit Linux
on:
push:
branches:
- master
env:
venv_dir: .venv
jobs:
auto-commit-linux:
runs-on: ubuntu-20.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal
steps:
- name: Install packages
run: |
add-apt-repository -y ppa:git-core/ppa
apt-get update
apt-get install -y git curl ca-certificates
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
- name: Add safe directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v3
with:
ref: master
- name: Install SMARTS
run: |
python3.8 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install .[camera_obs,rllib,test,torch,train]
- name: Update requirements
run: |
. ${{env.venv_dir}}/bin/activate
pip freeze | grep -v 'smarts' | grep -v 'pkg-resources==0.0.0' > requirements.txt
- name: Commit requirement changes
uses: EndBug/add-and-commit@v7
with:
add: "requirements.txt"
branch: master
default_author: user_info
message: "GitHub Actions: Update requirements.txt"
- name: isort, Black, and prettier
run: |
. ${{env.venv_dir}}/bin/activate
pip install .[dev]
isort -m VERTICAL_HANGING_INDENT --skip-gitignore --ac --tc --profile black ./cli ./envision ./examples/ ./utils/ ./scenarios/ ./smarts ./zoo
black .
npx prettier --write ./envision/web/src
- name: Commit format changes
uses: EndBug/add-and-commit@v7
with:
add: '["*.py", "*.html", "*.js"]'
branch: master
default_author: user_info
message: "GitHub Actions: Format"