This commit is contained in:
parent
cb96ea0656
commit
1216c6eb25
|
@ -0,0 +1,88 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- tests/one-to-one-messages
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: "1"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
tests:
|
||||||
|
name: tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
|
- run: pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Checkout status-go repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: status-im/status-go
|
||||||
|
path: status-go
|
||||||
|
|
||||||
|
- name: Build status-cli binary
|
||||||
|
run: |
|
||||||
|
cd status-go
|
||||||
|
make status-cli
|
||||||
|
|
||||||
|
- name: Copy status-cli binary to test repo root
|
||||||
|
run: |
|
||||||
|
cp status-go/status-cli .
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
pytest --alluredir=allure-results
|
||||||
|
|
||||||
|
- name: Get allure history
|
||||||
|
if: always()
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: gh-pages
|
||||||
|
path: gh-pages
|
||||||
|
|
||||||
|
- name: Setup allure report
|
||||||
|
uses: simple-elf/allure-report-action@master
|
||||||
|
if: always()
|
||||||
|
id: allure-report
|
||||||
|
with:
|
||||||
|
allure_results: allure-results
|
||||||
|
gh_pages: gh-pages
|
||||||
|
allure_history: allure-history
|
||||||
|
keep_reports: 30
|
||||||
|
|
||||||
|
- name: Deploy report to Github Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_branch: gh-pages
|
||||||
|
publish_dir: allure-history
|
||||||
|
|
||||||
|
- name: Create job summary
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
JOB_STATUS: ${{ job.status }}
|
||||||
|
run: |
|
||||||
|
echo "## Run Information" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- **Event**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- **Actor**: ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "Allure report will be available at: https://github.com/status-im/status-cli-tests/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
{
|
||||||
|
echo 'JOB_SUMMARY<<EOF'
|
||||||
|
cat $GITHUB_STEP_SUMMARY
|
||||||
|
echo EOF
|
||||||
|
} >> $GITHUB_ENV
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: Code Linters
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linters:
|
||||||
|
timeout-minutes: 10
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
|
- name: Set up virtual environment
|
||||||
|
run: |
|
||||||
|
python -m venv .venv
|
||||||
|
echo ".venv/bin" >> $GITHUB_PATH # Add virtualenv to PATH for subsequent steps
|
||||||
|
|
||||||
|
- name: Install dependencies based on requirements.txt
|
||||||
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Install pre-commit
|
||||||
|
run: pip install pre-commit
|
||||||
|
|
||||||
|
- name: Run pre-commit hooks
|
||||||
|
run: pre-commit run --all-files
|
Loading…
Reference in New Issue