Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions migration (2nd attempt) #190

Merged
merged 7 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/all-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Run all checks on Kedro Starters

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{inputs.python-version}}
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install test requirements
run: make install-test-requirements
- name: Run Bandit
run: bandit -ll -r .

run-tests:
strategy:
matrix:
os: [ windows-latest , ubuntu-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install test requirements
run: make install-test-requirements
- name: Add MSBuild to PATH
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1
- name: Install Microsoft Visual C++ Redistributable
if: matrix.os == 'windows-latest'
run: |
choco install vcredist-all
- name: Setup Hadoop binary
if: matrix.os == 'windows-latest'
run: |
Invoke-WebRequest "https://github.com/steveloughran/winutils/blob/master/hadoop-2.7.1/bin/winutils.exe?raw=true" -OutFile winutils.exe
Invoke-WebRequest "https://github.com/steveloughran/winutils/blob/master/hadoop-2.7.1/bin/hadoop.dll?raw=true" -OutFile hadoop.dll
Move-Item .\hadoop.dll C:\Windows\System32
New-Item -ItemType directory -Path C:\hadoop\bin
Move-Item .\winutils.exe C:\hadoop\bin
echo "HADOOP_HOME=C:\hadoop" | Out-File -Append -Encoding ascii -FilePath $env:GITHUB_ENV
echo "PATH=$env:HADOOP_HOME\bin;$env:PATH" | Out-File -Append -Encoding ascii -FilePath $env:GITHUB_ENV
- name: Run `kedro run` end to end tests for all starters
run: |
behave features/run.feature

lint:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{inputs.python-version}}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install test requirements
run: make install-test-requirements
- name: Run linter for all starters
run: behave features/lint.feature
25 changes: 25 additions & 0 deletions .github/workflows/merge-gatekeeper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Merge Gatekeeper

on:
pull_request:
branches:
- main

jobs:
merge-gatekeeper:
runs-on: ubuntu-latest
# Restrict permissions of the GITHUB_TOKEN.
# Docs: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
checks: read
statuses: read
steps:
- name: Run Merge Gatekeeper
# NOTE: v1 is updated to reflect the latest v1.x.y. Please use any tag/branch that suits your needs:
# https://github.com/upsidr/merge-gatekeeper/tags
# https://github.com/upsidr/merge-gatekeeper/branches
uses: upsidr/merge-gatekeeper@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
timeout: 3600
interval: 30