Skip to content

Commit 4da5e75

Browse files
committed
FIX
1 parent 6f5be58 commit 4da5e75

14 files changed

Lines changed: 1478 additions & 15 deletions

.github/workflows/test.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master, main, develop ]
6+
pull_request:
7+
branches: [ master, main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ruby-version: ['2.7.6', '3.0.7', '3.1.7']
16+
17+
name: Ruby ${{ matrix.ruby-version }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Ruby ${{ matrix.ruby-version }}
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: ${{ matrix.ruby-version }}
26+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27+
28+
- name: Install dependencies
29+
run: bundle install
30+
31+
- name: Run tests
32+
run: bundle exec rspec --format documentation
33+
34+
- name: Upload test results
35+
if: always()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: test-results-ruby-${{ matrix.ruby-version }}
39+
path: |
40+
spec/examples.txt
41+
coverage/
42+
if-no-files-found: ignore
43+
44+
# Optional: Test on macOS if needed
45+
test-macos:
46+
runs-on: macos-latest
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
ruby-version: ['2.7.6', '3.0.7', '3.1.7']
51+
52+
name: Ruby ${{ matrix.ruby-version }} (macOS)
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
- name: Set up Ruby ${{ matrix.ruby-version }}
58+
uses: ruby/setup-ruby@v1
59+
with:
60+
ruby-version: ${{ matrix.ruby-version }}
61+
bundler-cache: true
62+
63+
- name: Install dependencies
64+
run: bundle install
65+
66+
- name: Run tests
67+
run: bundle exec rspec --format documentation
68+
69+
# Check code quality
70+
lint:
71+
runs-on: ubuntu-latest
72+
name: RuboCop
73+
74+
steps:
75+
- uses: actions/checkout@v4
76+
77+
- name: Set up Ruby
78+
uses: ruby/setup-ruby@v1
79+
with:
80+
ruby-version: '3.1.7'
81+
bundler-cache: true
82+
83+
- name: Install RuboCop
84+
run: gem install rubocop
85+
86+
- name: Run RuboCop
87+
run: rubocop --format progress
88+
continue-on-error: true # Don't fail the build on RuboCop errors for now

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Ruby version management
2+
.ruby-version.bak
3+
4+
# RSpec
5+
spec/examples.txt
6+
.rspec_status
7+
8+
# Coverage reports
9+
coverage/
10+
11+
# Bundler
12+
.bundle/
13+
vendor/bundle/
14+
15+
# Gem files
16+
*.gem
17+
18+
# Logs
19+
*.log
20+
21+
# OS files
22+
.DS_Store
23+
Thumbs.db
24+
25+
# IDE files
26+
.idea/
27+
.vscode/
28+
*.swp
29+
*.swo
30+
*~
31+
32+
# Temporary files
33+
tmp/
34+
temp/

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.7

Gemfile.lock

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
PATH
2+
remote: .
3+
specs:
4+
ecpay_logistics (1.0.8)
5+
nokogiri (>= 1.6)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
diff-lcs (1.6.2)
11+
nokogiri (1.15.7-arm64-darwin)
12+
racc (~> 1.4)
13+
racc (1.8.1)
14+
rake (13.3.1)
15+
rspec (3.13.2)
16+
rspec-core (~> 3.13.0)
17+
rspec-expectations (~> 3.13.0)
18+
rspec-mocks (~> 3.13.0)
19+
rspec-core (3.13.6)
20+
rspec-support (~> 3.13.0)
21+
rspec-expectations (3.13.5)
22+
diff-lcs (>= 1.2.0, < 2.0)
23+
rspec-support (~> 3.13.0)
24+
rspec-mocks (3.13.7)
25+
diff-lcs (>= 1.2.0, < 2.0)
26+
rspec-support (~> 3.13.0)
27+
rspec-support (3.13.6)
28+
29+
PLATFORMS
30+
arm64-darwin-21
31+
32+
DEPENDENCIES
33+
bundler (>= 1.12)
34+
ecpay_logistics!
35+
rake (>= 10.0)
36+
rspec (~> 3.4)
37+
38+
BUNDLED WITH
39+
2.3.14

0 commit comments

Comments
 (0)