-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 1.91 KB
/
cli_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CLI Tests and Linting
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.3'
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop --parallel
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
ruby-version: ['3.3.3']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run Minitest tests
run: |
bundle exec rake test TESTOPTS="--verbose"
env:
MINITEST_REPORTER: ProgressReporter
integration:
name: CLI Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.3'
bundler-cache: true
- name: Create test images directory
run: |
mkdir -p test/fixtures/snapshots
# Create a simple test PNG file
convert -size 100x100 xc:white test/fixtures/snapshots/test1.png
convert -size 200x200 xc:blue test/fixtures/snapshots/test2.png
- name: Run CLI command
env:
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }}
run: |
bundle exec ruby exe/emerge upload snapshots \
--name "Emerge CLI Test" \
--id "com.emerge-cli.integration" \
--repo-name "EmergeTools/emerge-cli" \
--debug \
test/fixtures/snapshots