Skip to content

Commit 37606b1

Browse files
committed
fix ci
1 parent d345a63 commit 37606b1

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

.github/workflows/linux.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

44
name: test
55

66
on:
77
push:
88
branches: [ release, test ]
9+
pull_request:
10+
branches: [ main ]
911

1012
jobs:
1113
build:
1214

1315
runs-on: ${{ matrix.os }}
1416
environment: build
15-
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'skip linux')"
17+
if: ${{ !contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'skip linux') }}
1618

1719
strategy:
1820
matrix:
1921
os: [ubuntu-latest]
22+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2023

2124
steps:
22-
- uses: actions/checkout@v2
23-
24-
# script:
25-
- run: cp sample.env .env
26-
- run: pip --version
27-
- run: pip install -r requirements.txt
28-
- run: bin/test
25+
- uses: actions/checkout@v4
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -r requirements.txt
34+
- name: Copy environment file
35+
run: cp sample.env .env
36+
- name: Run tests
37+
run: bin/test
2938

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
[中文](README_zh.md)
1+
22

33
# Electerm sync server python
44

55
[![Build Status](https://github.com/electerm/electerm-sync-server-python/actions/workflows/linux.yml/badge.svg)](https://github.com/electerm/electerm-sync-server-python/actions)
66

77

8+
[中文](README_zh.md) | [English](README.md)
89

910
A simple electerm data sync server with python.
1011

README_zh.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[![Build Status](https://github.com/electerm/electerm-sync-server-python/actions/workflows/linux.yml/badge.svg)](https://github.com/electerm/electerm-sync-server-python/actions)
66

7+
[中文](README_zh.md) | [English](README.md)
8+
79
一个简单的 Electerm 数据同步服务器,使用 Python。
810

911
## 使用

bin/release

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
cd `dirname $0`
3+
cd ..
4+
git co main
5+
git pull
6+
git pull
7+
git delete-branch release
8+
git create-branch release
9+
git push origin release -u
10+
git co -

0 commit comments

Comments
 (0)