@apanel256/test-test123 1.0.8 → 1.0.10

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.
@@ -7,7 +7,7 @@ on:
7
7
 
8
8
  jobs:
9
9
  build:
10
- runs-on: ubuntu-latest
10
+ runs-on: windows-latest
11
11
 
12
12
  steps:
13
13
  - name: Checkout code
@@ -0,0 +1,29 @@
1
+ name: Docker Build & Push
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ docker:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Login to Docker Hub
16
+ uses: docker/login-action@v3
17
+ with:
18
+ username: ${{ secrets.DOCKER_USERNAME }}
19
+ password: ${{ secrets.DOCKER_PASSWORD }}
20
+
21
+ - name: Build Docker image
22
+ run: |
23
+ docker build -t ${{ secrets.DOCKER_USERNAME }}/test:${{ github.ref_name }} .
24
+ docker tag ${{ secrets.DOCKER_USERNAME }}/test:${{ github.ref_name }} ${{ secrets.DOCKER_USERNAME }}/test:latest
25
+
26
+ - name: Push Docker image
27
+ run: |
28
+ docker push ${{ secrets.DOCKER_USERNAME }}/test:${{ github.ref_name }}
29
+ docker push ${{ secrets.DOCKER_USERNAME }}/test:latest
@@ -5,19 +5,8 @@ on:
5
5
 
6
6
  jobs:
7
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 src/main.py
8
+ uses: ./.github/workflows/python-template.yml
9
+ with:
10
+ python-version: "3.11"
11
+ command: pylint --fail-under=7.0 src/main.py external/practice/bit_manipulation/binary_and_operator.py
12
+ use-submodules: true
@@ -1,12 +1,42 @@
1
- name: Publish to npm
1
+ name: Publish to npm Pipeline
2
2
 
3
3
  on:
4
4
  push:
5
- tags:
6
- - "v*"
5
+ tags: "v*"
7
6
 
8
7
  jobs:
8
+ tests:
9
+ uses: ./.github/workflows/python-template.yml
10
+ with:
11
+ python-version: "3.11"
12
+ command: pytest src
13
+
14
+ build:
15
+ needs: tests
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Setup Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: '3.11'
26
+
27
+ - name: Install deps
28
+ run: pip install -r requirements.txt
29
+
30
+ - run: pyinstaller src/main.py
31
+
32
+ - name: Upload Artifact
33
+ uses: actions/upload-artifact@v4
34
+ with:
35
+ name: app-build
36
+ path: dist/
37
+
9
38
  publish:
39
+ needs: build
10
40
  runs-on: ubuntu-latest
11
41
 
12
42
  steps:
@@ -0,0 +1,28 @@
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ pull_request:
5
+ branches: main
6
+ types: closed
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ deploy:
15
+ if: github.event.pull_request.merged == true
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Upload artifact
23
+ uses: actions/upload-pages-artifact@v3
24
+ with:
25
+ path: site
26
+
27
+ - name: Deploy to GitHub Pages
28
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,35 @@
1
+ name: Python CI Template
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ python-version:
7
+ required: true
8
+ type: string
9
+ command:
10
+ required: true
11
+ type: string
12
+ use-submodules:
13
+ required: false
14
+ type: boolean
15
+ default: false
16
+
17
+ jobs:
18
+ run:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v4
23
+ with:
24
+ submodules: ${{ inputs.use-submodules }}
25
+
26
+ - name: Setup Python
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: ${{ inputs.python-version }}
30
+
31
+ - name: Install dependencies
32
+ run: pip install -r requirements.txt
33
+
34
+ - name: Run command
35
+ run: ${{ inputs.command }}
@@ -0,0 +1,24 @@
1
+ name: Scheduled Dependency Check
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 10 * * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ check:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Setup Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+
20
+ - name: Install dependencies
21
+ run: pip install -r requirements.txt
22
+
23
+ - name: Show outdated packages
24
+ run: pip list --outdated
@@ -4,21 +4,8 @@ on:
4
4
  pull_request:
5
5
 
6
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
- working-directory: ./src
24
- run: pytest
7
+ tests:
8
+ uses: ./.github/workflows/python-template.yml
9
+ with:
10
+ python-version: "3.11"
11
+ command: pytest src
package/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "external/practice"]
2
+ path = external/practice
3
+ url = https://github.com/TheAlgorithms/Python.git
package/Dockerfile ADDED
@@ -0,0 +1,10 @@
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install -r requirements.txt
7
+
8
+ COPY src ./src
9
+
10
+ CMD ["python", "src/main.py"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apanel256/test-test123",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/site/index.html CHANGED
@@ -2,10 +2,73 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
- <title>GitHub Actions Deploy</title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CI/CD Demo</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
6
9
  </head>
7
10
  <body>
8
- <h1>GitHub Actions работает!</h1>
9
- <p>Сайт автоматически задеплоен через CI/CD.</p>
11
+ <div class="container">
12
+ <header>
13
+ <div class="logo">
14
+ <i class="fas fa-rocket"></i>
15
+ <span>CI/CD Demo</span>
16
+ </div>
17
+ </header>
18
+
19
+ <main>
20
+ <div class="card">
21
+ <h1>
22
+ <i class="fas fa-check-circle"></i>
23
+ GitHub Actions работает!
24
+ </h1>
25
+
26
+ <p class="subtitle">
27
+ Сайт автоматически задеплоен через CI/CD пайплайн
28
+ </p>
29
+
30
+ <div class="status">
31
+ <div class="status-item">
32
+ <i class="fas fa-code-branch"></i>
33
+ <div>
34
+ <small>Branch</small>
35
+ <strong>main</strong>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="status-item">
40
+ <i class="fas fa-check-circle"></i>
41
+ <div>
42
+ <small>Status</small>
43
+ <strong class="success">Success</strong>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="status-item">
48
+ <i class="fas fa-clock"></i>
49
+ <div>
50
+ <small>Last Deploy</small>
51
+ <strong id="deploy-time"></strong>
52
+ </div>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="badge">
57
+ <i class="fas fa-bolt"></i>
58
+ Powered by GitHub Actions
59
+ </div>
60
+ </div>
61
+ </main>
62
+
63
+ <footer>
64
+ <p>
65
+ <i class="fas fa-heart"></i> Deployed with GitHub Actions & Pages
66
+ <br>
67
+ <small id="footer-time"></small>
68
+ </p>
69
+ </footer>
70
+ </div>
71
+
72
+ <script src="script.js"></script>
10
73
  </body>
11
74
  </html>
package/site/script.js ADDED
@@ -0,0 +1,46 @@
1
+ function updateTime() {
2
+ const now = new Date();
3
+
4
+ const options = {
5
+ weekday: 'long',
6
+ year: 'numeric',
7
+ month: 'long',
8
+ };
9
+
10
+ const timeString = now.toLocaleDateString('en-US', options);
11
+
12
+ document.getElementById('deploy-time').textContent = timeString;
13
+ document.getElementById('footer-time').textContent = timeString;
14
+ }
15
+
16
+ function addAnimations() {
17
+ const items = document.querySelectorAll('.status-item');
18
+
19
+ items.forEach((item, index) => {
20
+ item.style.opacity = '0';
21
+ item.style.transform = 'translateY(20px)';
22
+
23
+ setTimeout(() => {
24
+ item.style.transition = 'all 0.5s ease';
25
+ item.style.opacity = '1';
26
+ item.style.transform = 'translateY(0)';
27
+ }, index * 200);
28
+ });
29
+
30
+ items.forEach(item => {
31
+ item.addEventListener('mouseenter', () => {
32
+ item.style.transform = 'translateY(-5px)';
33
+ });
34
+
35
+ item.addEventListener('mouseleave', () => {
36
+ item.style.transform = 'translateY(0)';
37
+ });
38
+ });
39
+ }
40
+
41
+ document.addEventListener('DOMContentLoaded', () => {
42
+ updateTime();
43
+ addAnimations();
44
+
45
+ console.log('CI/CD Demo - Deployed via GitHub Actions');
46
+ });
package/site/style.css ADDED
@@ -0,0 +1,165 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
9
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
10
+ min-height: 100vh;
11
+ color: white;
12
+ padding: 20px;
13
+ }
14
+
15
+ .container {
16
+ max-width: 600px;
17
+ margin: 0 auto;
18
+ min-height: 100vh;
19
+ display: flex;
20
+ flex-direction: column;
21
+ }
22
+
23
+ header {
24
+ padding: 30px 0;
25
+ text-align: center;
26
+ }
27
+
28
+ .logo {
29
+ display: inline-flex;
30
+ align-items: center;
31
+ gap: 12px;
32
+ font-size: 1.5rem;
33
+ font-weight: 600;
34
+ background: rgba(255, 255, 255, 0.1);
35
+ padding: 12px 24px;
36
+ border-radius: 50px;
37
+ backdrop-filter: blur(10px);
38
+ }
39
+
40
+ .logo i {
41
+ color: #48bb78;
42
+ }
43
+
44
+ main {
45
+ flex: 1;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ }
50
+
51
+ .card {
52
+ background: rgba(255, 255, 255, 0.95);
53
+ color: #333;
54
+ padding: 40px;
55
+ border-radius: 20px;
56
+ text-align: center;
57
+ width: 100%;
58
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
59
+ }
60
+
61
+ h1 {
62
+ font-size: 2.2rem;
63
+ margin-bottom: 15px;
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: center;
67
+ gap: 15px;
68
+ flex-wrap: wrap;
69
+ }
70
+
71
+ h1 i {
72
+ color: #48bb78;
73
+ font-size: 2.5rem;
74
+ }
75
+
76
+ .subtitle {
77
+ font-size: 1.1rem;
78
+ color: #666;
79
+ margin-bottom: 30px;
80
+ line-height: 1.5;
81
+ }
82
+
83
+ .status {
84
+ display: grid;
85
+ grid-template-columns: repeat(3, 1fr);
86
+ gap: 20px;
87
+ margin-bottom: 30px;
88
+ }
89
+
90
+ .status-item {
91
+ background: #f8fafc;
92
+ padding: 20px;
93
+ border-radius: 12px;
94
+ display: flex;
95
+ align-items: center;
96
+ gap: 15px;
97
+ }
98
+
99
+ .status-item i {
100
+ font-size: 1.8rem;
101
+ color: #4299e1;
102
+ }
103
+
104
+ .status-item small {
105
+ display: block;
106
+ color: #718096;
107
+ font-size: 0.9rem;
108
+ margin-bottom: 5px;
109
+ }
110
+
111
+ .success {
112
+ color: #48bb78;
113
+ }
114
+
115
+ .badge {
116
+ display: inline-flex;
117
+ align-items: center;
118
+ gap: 10px;
119
+ background: linear-gradient(135deg, #4299e1, #667eea);
120
+ color: white;
121
+ padding: 12px 24px;
122
+ border-radius: 50px;
123
+ font-weight: 500;
124
+ }
125
+
126
+ .badge i {
127
+ animation: pulse 2s infinite;
128
+ }
129
+
130
+ @keyframes pulse {
131
+ 0% { transform: scale(1); }
132
+ 50% { transform: scale(1.1); }
133
+ 100% { transform: scale(1); }
134
+ }
135
+
136
+ footer {
137
+ text-align: center;
138
+ padding: 30px 0;
139
+ color: rgba(255, 255, 255, 0.8);
140
+ font-size: 0.9rem;
141
+ }
142
+
143
+ footer i {
144
+ color: #f56565;
145
+ margin-right: 5px;
146
+ }
147
+
148
+ @media (max-width: 640px) {
149
+ .container {
150
+ padding: 10px;
151
+ }
152
+
153
+ .card {
154
+ padding: 30px 20px;
155
+ }
156
+
157
+ h1 {
158
+ font-size: 1.8rem;
159
+ }
160
+
161
+ .status {
162
+ grid-template-columns: 1fr;
163
+ gap: 15px;
164
+ }
165
+ }