Skip to content

Commit

Permalink
Add test tags, and use it to exclude the real data
Browse files Browse the repository at this point in the history
tests from the Github build workflow. This is
because my AOC real input files are not uploaded
to the Github repo.
  • Loading branch information
dancarroll committed Dec 7, 2024
1 parent a8c559d commit bf7e90c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: dart test
run: dart test --exclude-tags real-data
4 changes: 2 additions & 2 deletions test/day1_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:aoc_2024/day1/part_2.dart' as part2;
import 'package:test/test.dart';

void main() {
group('sample data', () {
group('sample data', tags: 'sample-data', () {
final resources = Resources.sample;

test('part1', () async {
Expand All @@ -16,7 +16,7 @@ void main() {
});
});

group('real data', () {
group('real data', tags: 'real-data', () {
final resources = Resources.real;

test('part1', () async {
Expand Down
4 changes: 2 additions & 2 deletions test/day2_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:aoc_2024/day2/part_2.dart' as part2;
import 'package:test/test.dart';

void main() {
group('sample data', () {
group('sample data', tags: 'sample-data', () {
final resources = Resources.sample;

test('part1', () async {
Expand All @@ -16,7 +16,7 @@ void main() {
});
});

group('real data', () {
group('real data', tags: 'real-data', () {
final resources = Resources.real;

test('part1', () async {
Expand Down
4 changes: 2 additions & 2 deletions test/day3_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:aoc_2024/day3/part_2.dart' as part2;
import 'package:test/test.dart';

void main() {
group('sample data', () {
group('sample data', tags: 'sample-data', () {
final resources = Resources.sample;

test('part1', () async {
Expand All @@ -16,7 +16,7 @@ void main() {
});
});

group('real data', () {
group('real data', tags: 'real-data', () {
final resources = Resources.real;

test('part1', () async {
Expand Down
4 changes: 2 additions & 2 deletions test/day4_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:aoc_2024/day4/part_2.dart' as part2;
import 'package:test/test.dart';

void main() {
group('sample data', () {
group('sample data', tags: 'sample-data', () {
final resources = Resources.sample;

test('part1', () async {
Expand All @@ -16,7 +16,7 @@ void main() {
});
});

group('real data', () {
group('real data', tags: 'real-data', () {
final resources = Resources.real;

test('part1', () async {
Expand Down
4 changes: 2 additions & 2 deletions test/day5_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:aoc_2024/day5/part_2.dart' as part2;
import 'package:test/test.dart';

void main() {
group('sample data', () {
group('sample data', tags: 'sample-data', () {
final resources = Resources.sample;

test('part1', () async {
Expand All @@ -16,7 +16,7 @@ void main() {
});
});

group('real data', () {
group('real data', tags: 'real-data', () {
final resources = Resources.real;

test('part1', () async {
Expand Down
4 changes: 2 additions & 2 deletions test/day6_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:aoc_2024/day6/part_2.dart' as part2;
import 'package:test/test.dart';

void main() {
group('sample data', () {
group('sample data', tags: 'sample-data', () {
final resources = Resources.sample;

test('part1', () async {
Expand All @@ -16,7 +16,7 @@ void main() {
});
});

group('real data', () {
group('real data', tags: 'real-data', () {
final resources = Resources.real;

test('part1', () async {
Expand Down

0 comments on commit bf7e90c

Please sign in to comment.