Skip to content

Commit

Permalink
update readme and add testing action
Browse files Browse the repository at this point in the history
  • Loading branch information
devries committed Sep 6, 2023
1 parent 7572319 commit 1af7f92
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
push:
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1.20'

- name: Test utilities
run: go test -cover ./utils

- name: Test solutions
if: ${{ github.repository != "devries/aoc_template" }}
run: go test -cover ./day*
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ this.

# Instructions

To start a new day, generate code from a template using the command:
To start a new day, download your input from the advent of code website and put
it in a file named `dayXX.txt` where `XX` is replaced by the two digit day of
the month within a subdirectory called `inputs`. Then, to generate code from a
template using the command:

```
make start
Expand All @@ -35,8 +38,17 @@ To run the last code you worked on use the command:
make run
```

This will generate a `run.go` file and run the most recently modified code. You
can run all the days with the command:
This will generate a `run.go` file and run the most recently modified code. Once
the first part is finished you can start the second part by using the command:

```
make day21p2
```

This will copy your current part 1 code from `day21p1` and update the package
names. You can then edit that code to complete part 2.

You can run all the days with the command:

```
make runall
Expand Down

0 comments on commit 1af7f92

Please sign in to comment.