Skip to content

fix(ci): merubah konsep jalan workflow pre-commit #1054

fix(ci): merubah konsep jalan workflow pre-commit

fix(ci): merubah konsep jalan workflow pre-commit #1054

Workflow file for this run

name: Python Testing
on:
pull_request:
branches: [main]
jobs:
build:
# menjalankan testing dengan 3 os yaitu
# linux (ubuntu), windows, dan macOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
# untuk menggunakan arsitektur pada arm dan xx86
arm: [x86, arm64]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setting python versi 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Cache pip dependecies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt')}}
- name: Install Dependencies
run: |
echo "Installing required dependencies"
python -m pip install --upgrade pip
pip install -r requirements.txt -r dev-requirements.txt
- name: Python Linting
run: |
echo "Running flake8 tests"
flake8 .
# INFO: error pre-commit issue
# [#324](https://github.com/bellshade/Python/issues/324)
- name: jalankan pre-commit dari git action
run: |
pip install pre-commit
pre-commit install
pre-commit run --all-files