Skip to content

Update code_style.yml #45

Update code_style.yml

Update code_style.yml #45

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: test build
on:
push:
branches: ["master"]
pull_request:
branches: ["*"]
jobs:
changes:
name: Checking changed files
runs-on: ubuntu-latest
outputs:
keepgoing: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.{yml,py}
tests
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
echo ${{ steps.changed-files.outputs.any_changed }}
build:
needs:
- changes
if: needs.changes.outputs.keepgoing == 'true'
defaults:
run:
shell: bash -l {0}
strategy:
max-parallel: 6
matrix:
config:
- { python-version: 3.8, os: ubuntu-latest }
- { python-version: 3.9, os: ubuntu-latest }
- { python-version: "3.10", os: ubuntu-latest }
- { python-version: "3.11", os: ubuntu-latest }
- { python-version: 3.8, os: macos-latest }
- { python-version: 3.9, os: macos-latest }
- { python-version: "3.10", os: macos-latest }
- { python-version: "3.11", os: macos-latest }
runs-on: ${{ matrix.config.os }}
env:
TZ: UTC
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
cache: "pip"
cache-dependency-path: |
**/pyproject.toml
- name: Install
run: |
python -m pip install .
shell: bash {0}