Skip to content

Commit 7678116

Browse files
committed
Java Junior Developer - занятие 1
0 parents  commit 7678116

260 files changed

Lines changed: 20507 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 15
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '17'
26+
distribution: 'temurin'
27+
28+
- name: Build
29+
run: mvn -B clean compile -Dmaven.test.skip=true -Djava.awt.headless=true
30+
31+
- name: Run tests with coverage
32+
run: mvn -B test -Djava.awt.headless=true
33+
34+
- name: Verify coverage
35+
run: mvn -B verify -Dmaven.test.skip=true -Djava.awt.headless=true
36+
37+
- name: Coverage summary
38+
if: always()
39+
run: |
40+
if [ -f target/site/jacoco/jacoco.csv ]; then
41+
echo "## Test Coverage Report" >> $GITHUB_STEP_SUMMARY
42+
echo '```' >> $GITHUB_STEP_SUMMARY
43+
awk -F',' 'NR>1 {missed+=$4; covered+=$5} END {total=missed+covered; if(total>0) printf "Line Coverage: %d/%d (%.1f%%)\nMissed: %d lines\n", covered, total, covered*100/total, missed; else print "No coverage data"}' target/site/jacoco/jacoco.csv >> $GITHUB_STEP_SUMMARY
44+
echo '```' >> $GITHUB_STEP_SUMMARY
45+
echo "" >> $GITHUB_STEP_SUMMARY
46+
echo "### Per-class" >> $GITHUB_STEP_SUMMARY
47+
echo '| Class | Coverage | Lines |' >> $GITHUB_STEP_SUMMARY
48+
echo '|-------|----------|-------|' >> $GITHUB_STEP_SUMMARY
49+
awk -F',' 'NR>1 {total=$4+$5; if(total>0) pct=$5*100/total; else pct=100; printf "| %s.%s | %.0f%% | %d/%d |\n", $2, $3, pct, $5, total}' target/site/jacoco/jacoco.csv >> $GITHUB_STEP_SUMMARY
50+
fi
51+
52+
- name: Upload coverage
53+
if: always()
54+
uses: codecov/codecov-action@v4
55+
with:
56+
file: target/site/jacoco/jacoco.xml
57+
fail_ci_if_error: false
58+
env:
59+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
*.class
2+
3+
# Mobile Tools for Java (J2ME)
4+
.mtj.tmp/
5+
6+
# Package Files #
7+
*.jar
8+
*.war
9+
*.ear
10+
11+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12+
hs_err_pid*
13+
14+
atlassian-ide-plugin.xml
15+
.DS_Store
16+
17+
nbproject
18+
out
19+
private
20+
build
21+
dist
22+
target
23+
24+
# Log-files
25+
*.log
26+
27+
# Конфигурационный файл .idea
28+
.idea
29+
*.iml
30+
.idea/workspace.xml
31+

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: java
2+
jdk:
3+
- oraclejdk8

.~lock.java.ppt#

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
denis stepulenok,STEPULENOK-PC/gtee,STEPULENOK-PC.ru.oracle.com,21.05.2015 20:35,file:///C:/Users/gtee/AppData/Roaming/OracleOpenOffice/3;

00_intro.md

Lines changed: 312 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)