Skip to content

Commit

Permalink
Add initial CI flow
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Jun 6, 2024
1 parent 59a2960 commit 28920c8
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Freqtrade TUI CI

on:
push:
branches:
- main
- ci/*
release:
types: [published]
pull_request:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}"
cancel-in-progress: true
permissions:
repository-projects: read



jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "ubuntu-20.04", "ubuntu-22.04", "macos-12", "macos-13", "macos-14", "windows-latest" ]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ruff
- name: Run Ruff
run: |
ruff check --output-format=github
# - name: Run Ruff format check
# run: |
# ruff format --check

publish:
name: "Deploy to pypi"
if: (github.event_name == 'release')
environment:
name: release
url: https://pypi.org/p/ftui

needs: build
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"


- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install build
- name: Build package
run: |
pip install -U build
python -m build
- name: Publish to PyPI (Test)
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.14

0 comments on commit 28920c8

Please sign in to comment.