mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-08-05 23:24:07 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 35bb25e405 | |||
| 43a83e4004 | |||
| d966bd1aa4 | |||
| 144125d355 |
+23
-13
@@ -46,6 +46,13 @@ jobs:
|
|||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
# Expose the resolved Go version as an env var so it is never
|
||||||
|
# interpolated directly into a shell script (avoids script injection).
|
||||||
|
- name: Export Go version
|
||||||
|
env:
|
||||||
|
GO_VERSION: ${{ steps.setup-go.outputs.go-version }}
|
||||||
|
run: echo "GO_VERSION=$GO_VERSION" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Install Task
|
- name: Install Task
|
||||||
uses: go-task/setup-task@v1
|
uses: go-task/setup-task@v1
|
||||||
|
|
||||||
@@ -66,7 +73,7 @@ jobs:
|
|||||||
{
|
{
|
||||||
cat << EOF
|
cat << EOF
|
||||||
## 🔧 Test Environment
|
## 🔧 Test Environment
|
||||||
- **Go Version:** ${{ steps.setup-go.outputs.go-version }}
|
- **Go Version:** $GO_VERSION
|
||||||
- **OS:** ubuntu-latest
|
- **OS:** ubuntu-latest
|
||||||
- **Timestamp:** $(date -u)
|
- **Timestamp:** $(date -u)
|
||||||
|
|
||||||
@@ -86,7 +93,7 @@ jobs:
|
|||||||
# Generate test summary
|
# Generate test summary
|
||||||
{
|
{
|
||||||
cat << EOF
|
cat << EOF
|
||||||
## 🧪 Test Results (Go ${{ steps.setup-go.outputs.go-version }})
|
## 🧪 Test Results (Go $GO_VERSION)
|
||||||
|
|
||||||
| Metric | Value |
|
| Metric | Value |
|
||||||
| ----------- | ------------------------------------------------------------- |
|
| ----------- | ------------------------------------------------------------- |
|
||||||
@@ -148,7 +155,7 @@ jobs:
|
|||||||
|
|
||||||
{
|
{
|
||||||
cat << EOF
|
cat << EOF
|
||||||
## 📊 Code Coverage (Go ${{ steps.setup-go.outputs.go-version }})
|
## 📊 Code Coverage (Go $GO_VERSION)
|
||||||
|
|
||||||
**Total Coverage: $COVERAGE**
|
**Total Coverage: $COVERAGE**
|
||||||
|
|
||||||
@@ -209,7 +216,7 @@ jobs:
|
|||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: test-results-go-${{ steps.setup-go.outputs.go-version }}
|
name: test-results-go-${{ env.GO_VERSION }}
|
||||||
path: |
|
path: |
|
||||||
test-output.log
|
test-output.log
|
||||||
coverage/
|
coverage/
|
||||||
@@ -219,7 +226,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
{
|
{
|
||||||
cat << EOF
|
cat << EOF
|
||||||
## 🔍 Static Analysis (Go ${{ steps.setup-go.outputs.go-version }})
|
## 🔍 Static Analysis (Go $GO_VERSION)
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -263,9 +270,10 @@ jobs:
|
|||||||
- name: Job Summary
|
- name: Job Summary
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
cat >> "$GITHUB_STEP_SUMMARY" << 'EOF'
|
{
|
||||||
## 📋 Job Summary (Go ${{ steps.setup-go.outputs.go-version }})
|
echo "## 📋 Job Summary (Go $GO_VERSION)"
|
||||||
|
echo ""
|
||||||
|
cat << 'EOF'
|
||||||
| Step | Status |
|
| Step | Status |
|
||||||
| --------------- | --------------------------------------------------------------- |
|
| --------------- | --------------------------------------------------------------- |
|
||||||
| Dependencies | Success |
|
| Dependencies | Success |
|
||||||
@@ -275,12 +283,13 @@ jobs:
|
|||||||
| Static Analysis | ${{ job.status == 'success' && 'Clean' || 'Issues' }} |
|
| Static Analysis | ${{ job.status == 'success' && 'Clean' || 'Issues' }} |
|
||||||
| Code Formatting | ${{ job.status == 'success' && 'Clean' || 'Issues' }} |
|
| Code Formatting | ${{ job.status == 'success' && 'Clean' || 'Issues' }} |
|
||||||
EOF
|
EOF
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
files: ./coverage/coverage.out
|
files: ./coverage/coverage.out
|
||||||
flags: Go ${{ steps.setup-go.outputs.go-version }}
|
flags: Go ${{ env.GO_VERSION }}
|
||||||
slug: kjanat/articulate-parser
|
slug: kjanat/articulate-parser
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
@@ -288,7 +297,7 @@ jobs:
|
|||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
uses: codecov/test-results-action@v1
|
uses: codecov/test-results-action@v1
|
||||||
with:
|
with:
|
||||||
flags: Go ${{ steps.setup-go.outputs.go-version }}
|
flags: Go ${{ env.GO_VERSION }}
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
docker-test:
|
docker-test:
|
||||||
@@ -344,6 +353,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout Repository"
|
- name: "Checkout Repository"
|
||||||
@@ -371,13 +381,13 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
@@ -412,7 +422,7 @@ jobs:
|
|||||||
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/master/DOCKER.md
|
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/master/DOCKER.md
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
# Multi-architecture build - Docker automatically provides TARGETOS, TARGETARCH, etc.
|
# Multi-architecture build - Docker automatically provides TARGETOS, TARGETARCH, etc.
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
build/articulate-parser-linux-amd64
|
build/articulate-parser-linux-amd64
|
||||||
@@ -91,13 +91,13 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
@@ -131,7 +131,7 @@ jobs:
|
|||||||
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/master/DOCKER.md
|
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/master/DOCKER.md
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: |
|
platforms: |
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ run:
|
|||||||
# Timeout for total work
|
# Timeout for total work
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
|
|
||||||
# Skip directories (not allowed in config v2, will use issues exclude instead)
|
|
||||||
|
|
||||||
# Go version is autodetected from go.mod
|
|
||||||
|
|
||||||
# Include test files
|
# Include test files
|
||||||
tests: true
|
tests: true
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
module github.com/kjanat/articulate-parser
|
module github.com/kjanat/articulate-parser
|
||||||
|
|
||||||
go 1.25.0
|
go 1.26.0
|
||||||
|
|
||||||
toolchain go1.25.5
|
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/fumiama/go-docx v0.0.0-20250506085032-0c30fd09304b
|
github.com/fumiama/go-docx v0.0.0-20250506085032-0c30fd09304b
|
||||||
@@ -12,5 +10,5 @@ require (
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/fumiama/imgsz v0.0.4 // indirect
|
github.com/fumiama/imgsz v0.0.4 // indirect
|
||||||
golang.org/x/image v0.34.0 // indirect
|
golang.org/x/image v0.42.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ github.com/fumiama/go-docx v0.0.0-20250506085032-0c30fd09304b h1:/mxSugRc4SgN7Xg
|
|||||||
github.com/fumiama/go-docx v0.0.0-20250506085032-0c30fd09304b/go.mod h1:ssRF0IaB1hCcKIObp3FkZOsjTcAHpgii70JelNb4H8M=
|
github.com/fumiama/go-docx v0.0.0-20250506085032-0c30fd09304b/go.mod h1:ssRF0IaB1hCcKIObp3FkZOsjTcAHpgii70JelNb4H8M=
|
||||||
github.com/fumiama/imgsz v0.0.4 h1:Lsasu2hdSSFS+vnD+nvR1UkiRMK7hcpyYCC0FzgSMFI=
|
github.com/fumiama/imgsz v0.0.4 h1:Lsasu2hdSSFS+vnD+nvR1UkiRMK7hcpyYCC0FzgSMFI=
|
||||||
github.com/fumiama/imgsz v0.0.4/go.mod h1:bISOQVTlw9sRytPwe8ir7tAaEmyz9hSNj9n8mXMBG0E=
|
github.com/fumiama/imgsz v0.0.4/go.mod h1:bISOQVTlw9sRytPwe8ir7tAaEmyz9hSNj9n8mXMBG0E=
|
||||||
golang.org/x/image v0.34.0 h1:33gCkyw9hmwbZJeZkct8XyR11yH889EQt/QH4VmXMn8=
|
golang.org/x/image v0.42.0 h1:1gSs6ehNWXLbkHBIPcWztk3D/6aIA/8hauiAYtlodVY=
|
||||||
golang.org/x/image v0.34.0/go.mod h1:2RNFBZRB+vnwwFil8GkMdRvrJOFd1AzdZI6vOY+eJVU=
|
golang.org/x/image v0.42.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
|
||||||
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
|
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
|
||||||
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
|
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
|
||||||
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
|
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
|
||||||
|
|||||||
Binary file not shown.
@@ -17,10 +17,8 @@ import (
|
|||||||
|
|
||||||
// Default endpoint configuration for the Articulate Rise API.
|
// Default endpoint configuration for the Articulate Rise API.
|
||||||
const (
|
const (
|
||||||
// Root URL for the Articulate Rise API.
|
riseHost = "rise.articulate.com"
|
||||||
defaultBaseURL = "https://rise.articulate.com"
|
defaultBaseURL = "https://" + riseHost
|
||||||
// Expected host for Articulate Rise share URLs.
|
|
||||||
riseHost = "rise.articulate.com"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// shareIDRegex is compiled once at package init for extracting share IDs from URIs.
|
// shareIDRegex is compiled once at package init for extracting share IDs from URIs.
|
||||||
|
|||||||
Reference in New Issue
Block a user