Skip to content

Build only on merge #27

Build only on merge

Build only on merge #27

Workflow file for this run

name: lsassy Tests & Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: windows-latest
steps:
- name: Create new user
run: |
net user pixis P4ssw0rd /add
- name: Add to local admin
run: |
net localgroup Administrators pixis /add
- name: Update registry key
run: |
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run Lsassy Tests
run: |
python -m unittest discover tests
build:
if: github.event.pull_request.merged == true
needs: test
name: lsassy actions on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ['3.9']
steps:
- name: Checking out
uses: actions/checkout@v2
- name: Setup on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- name: Building binary with pyinstaller
run: |
pip install pyinstaller -r requirements.txt
pyinstaller ./lsassy/console.py --onefile --clean -n lsassy --additional-hooks-dir=hooks
- name: Uploading lsassy binary for ${{ matrix.os }}
uses: actions/upload-artifact@master
with:
name: lsassy-${{ matrix.os }}
path: |
dist/lsassy
dist/lsassy.exe