@apanel256/test-test123 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Setup Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.11'
20
+
21
+ - name: Install deps
22
+ run: pip install -r requirements.txt
23
+
24
+ - run: pyinstaller main.py
25
+
26
+ - name: Upload Artifact
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: app-build
30
+ path: dist/
@@ -0,0 +1,13 @@
1
+ name: Hello World
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ hello:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Say hello
13
+ run: echo "Hello, World!"
@@ -0,0 +1,23 @@
1
+ name: Lint
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ lint:
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v4
13
+
14
+ - name: Setup Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: '3.11'
18
+
19
+ - name: Install deps
20
+ run: pip install -r requirements.txt
21
+
22
+ - name: Run linter
23
+ run: pylint --fail-under=7.0 main.py
@@ -0,0 +1,25 @@
1
+ name: Matrix Build
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ matrix:
13
+ os: [ubuntu-latest, windows-latest, macos-latest]
14
+ python: ['3.9', '3.11']
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python }}
24
+
25
+ - run: python main.py
@@ -0,0 +1,28 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Setup Node
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '20'
20
+ registry-url: 'https://registry.npmjs.org'
21
+
22
+ - name: Install npm
23
+ run: npm install
24
+
25
+ - name: Publish
26
+ run: npm publish --access=public
27
+ env:
28
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,23 @@
1
+ name: Unit Tests
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ test:
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v4
13
+
14
+ - name: Setup Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: '3.11'
18
+
19
+ - name: Install deps
20
+ run: pip install -r requirements.txt
21
+
22
+ - name: Run tests
23
+ run: pytest
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # github-actions-practice
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ function add(a, b) {
2
+ return a + b;
3
+ }
4
+
5
+ module.exports = add;
package/main.py ADDED
@@ -0,0 +1,25 @@
1
+ """Модуль для сложения двух чисел."""
2
+
3
+ from numbers import Number
4
+
5
+ def add(a: Number, b: Number) -> Number:
6
+ """Складывает два числа.
7
+
8
+ Args:
9
+ a: Первое число
10
+ b: Второе число
11
+
12
+ Returns:
13
+ Сумма a и b
14
+ """
15
+ return a + b
16
+
17
+
18
+ def main() -> None:
19
+ """Основная функция программы."""
20
+ result = add(50, 2)
21
+ print(result)
22
+
23
+
24
+ if __name__ == "__main__":
25
+ main()
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@apanel256/test-test123",
3
+ "version": "1.0.7",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs"
13
+ }
@@ -0,0 +1,3 @@
1
+ pytest
2
+ pylint
3
+ pyinstaller
package/test_main.py ADDED
@@ -0,0 +1,4 @@
1
+ from main import add
2
+
3
+ def test_add():
4
+ assert add(2, 3) == 5