Skip to content

Commit

Permalink
Merge pull request #25 from ScrapeGraphAI/continuos-integration
Browse files Browse the repository at this point in the history
Continuos integration
  • Loading branch information
lurenss authored Oct 7, 2024
2 parents 291f1b2 + e824846 commit da1f3a1
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '42 19 * * 5'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
32 changes: 32 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: mvincig11
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
git fetch --all --tags
python setup.py sdist bdist_wheel
twine upload dist/*
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release
on:
push:
branches:
- main
- pre/*

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install git
run: |
sudo apt update
sudo apt install -y git
- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
- name: Install Node Env
uses: actions/setup-node@v4
with:
node-version: 20
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
persist-credentials: false
- name: Build app
run: |
rye sync --no-lock
rye build
id: build_cache
if: success()
- name: Cache build
uses: actions/cache@v2
with:
path: ./dist
key: ${{ runner.os }}-build-${{ hashFiles('dist/**') }}
if: steps.build_cache.outputs.id != ''

release:
name: Release
runs-on: ubuntu-latest
needs: build
environment: development
if: |
github.event_name == 'push' && github.ref == 'refs/heads/main' ||
github.event_name == 'push' && github.ref == 'refs/heads/pre/beta' ||
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'main' ||
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'pre/beta'
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout repo
uses: actions/[email protected]
with:
fetch-depth: 0
persist-credentials: false
- name: Semantic Release
uses: cycjimmy/[email protected]
with:
semantic_version: 23
extra_plugins: |
semantic-release-pypi@3
@semantic-release/git
@semantic-release/commit-analyzer@12
@semantic-release/release-notes-generator@13
@semantic-release/github@10
@semantic-release/changelog@6
conventional-changelog-conventionalcommits@7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,19 @@ print(entities)
}
}
```

## 🤝 Contributing

Feel free to contribute and join our Discord server to discuss with us improvements and give us suggestions!

Please see the [contributing guidelines](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/CONTRIBUTING.md).

[![My Skills](https://skillicons.dev/icons?i=discord)](https://discord.gg/uJN7TYcpNa)
[![My Skills](https://skillicons.dev/icons?i=linkedin)](https://www.linkedin.com/company/scrapegraphai/)
[![My Skills](https://skillicons.dev/icons?i=twitter)](https://twitter.com/scrapegraphai)

***
## Created by Scrapegraphai

![](docs/assets/scrapegraphai_logo.svg)
***
Binary file modified docs/assets/graph_pyecharts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit da1f3a1

Please sign in to comment.