Skip to content

Commit

Permalink
fix: Debian (macOS) compatibility (and GH workflows) (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender authored Jan 22, 2025
1 parent 560e2e1 commit 080dcde
Show file tree
Hide file tree
Showing 133 changed files with 47,902 additions and 46,892 deletions.
20 changes: 9 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# EditorConfig is awesome: http://EditorConfig.org
# EditorConfig: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
# Global settings for all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 4 space indentation
[*.{py,java,r,R}]
indent_style = space
indent_size = 4
indent_size = 2
tab_width = 2

# 2 space indentation
[*.{js,json,y{a,}ml,html,cwl}]
#### File Type Overrides ####

[*.{py,java,r,R}]
indent_style = space
indent_size = 2
indent_size = 4

[*.{md,Rmd,rst}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ updates:
schedule:
interval: "monthly"
- package-ecosystem: "bundler"
directory: "/"
directory: "/docs"
schedule:
interval: "monthly"
6 changes: 4 additions & 2 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: 3.12

- name: Build library
run: python3 -m pip install build --user
run: |
pip install -U --upgrade-strategy=only-if-needed pip
python3 -m pip install build --user
- name: Build wheel and tarball
run: python3 -m build
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Deploy website

on: workflow_dispatch

permissions:
contents: read

concurrency:
group: docs-website

Expand All @@ -12,10 +15,16 @@ jobs:
deploy:
name: Cloudflare Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/Gemfile
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

environment:
name: stockindicators.dev
url: ${{ steps.deploy.outputs.deployment-alias-url }}
url: ${{ steps.deploy.outputs.pages-deployment-alias-url }}

steps:
- name: Checkout source
Expand All @@ -24,9 +33,11 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: docs
ruby-version: 3.3

- name: Install dependencies
run: bundle install

- name: Define tag
id: tag
run: echo "version=$(date +'%Y.%m.%d')-${{ github.run_number }}" >> $GITHUB_OUTPUT
Expand All @@ -38,28 +49,16 @@ jobs:
replace: "${{ steps.tag.outputs.version }}"
regex: false

- name: Install GEMs
working-directory: docs
env:
BUNDLE_GEMFILE: ${{github.workspace}}/docs/GemFile
run: |
pwd
bundle install
- name: Build site (production)
if: github.ref == 'refs/heads/main'
working-directory: docs
env:
JEKYLL_ENV: production
BUNDLE_GEMFILE: ${{github.workspace}}/docs/GemFile
run: bundle exec jekyll build

- name: Build site (preview)
if: github.ref != 'refs/heads/main'
working-directory: docs
env:
JEKYLL_ENV: preview
BUNDLE_GEMFILE: ${{github.workspace}}/docs/GemFile
run: bundle exec jekyll build

- name: Publish to Cloudflare Pages
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Test with code coverage
name: Test code coverage

on: ["push"]
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: indicators
runs-on: macos-latest
runs-on: ubuntu-latest

steps:
- name: Checkout source
Expand All @@ -19,25 +25,24 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: "ga"
dotnet-version: 9.x
dotnet-quality: ga

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "pip"

- name: Install requirements
- name: Install dependencies
run: |
pip install -U --upgrade-strategy=only-if-needed pip
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Test indicators
run: |
sed -i '' 's/export\ LC_ALL=en_US.UTF-8/export\ LC_ALL=ru_RU.UTF-8/g' ~/.bashrc
source ~/.bashrc
locale
coverage run -m --source=stock_indicators pytest -svr A tests
coverage run -m --source=stock_indicators pytest
coverage xml
- name: Publish coverage to Codacy
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/test-docs-a11y.yml

This file was deleted.

81 changes: 0 additions & 81 deletions .github/workflows/test-docs-links.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/test-indicators-all-env.yml

This file was deleted.

Loading

0 comments on commit 080dcde

Please sign in to comment.