diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4cd07a7..a83e5b1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,8 +26,32 @@ jobs: - name: Install test runner run: go install gotest.tools/gotestsum@latest - - name: Test - run: gotestsum -f github-actions ./... + - name: Tests + run: | + gotestsum -f github-actions ./... + + coverage: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + + - name: Coverage + run: | + go test \ + -coverprofile cover.out \ + -covermode count \ + -coverpkg ./... \ + -shuffle on \ + ./... + + - name: Report + run: go tool cover -func=cover.out build-release: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 8f0f0f7..a1cd97b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ a.o *.orig *.tmp *~ +/cover.out diff --git a/docs/COUNTDOWN.asm b/docs/COUNTDOWN.asm index aac73c9..832765f 100644 --- a/docs/COUNTDOWN.asm +++ b/docs/COUNTDOWN.asm @@ -1,4 +1,4 @@ -;;; countdown.asm : a program for a tutorial that counts down to blast off +;;; COUNTDOWN.asm : a program for a tutorial that counts down to blast off ;;; Inputs: R0 is the address of counter. .ORIG x3000 ; Start at the beginning of user-space memory. diff --git a/docs/TUTORIAL.md b/docs/TUTORIAL.md index 1e0d2ca..33e0250 100644 --- a/docs/TUTORIAL.md +++ b/docs/TUTORIAL.md @@ -333,7 +333,7 @@ create machine code from source. In this directory you will find an assembly program. To translate the source to an object file containing machine code, run: ```console -$ elsie asm countdown.asm +$ elsie asm COUNTDOWN.asm ``` Well, that isn't satisfying, but no output means success in this case. @@ -354,7 +354,7 @@ Options: ``` ```console -$ elsie asm -debug countdown.asm +$ elsie asm -debug COUNTDOWN.asm TIMESTAMP : 2023-10-11T11:51:30-04:00 LEVEL : DEBUG SOURCE : asm.go:66 @@ -398,7 +398,7 @@ Before running the countdown program, let's take a look at the source code to get an idea what it is going to do. ``` -;;; countdown.asm : a program for a tutorial that counts down to blast off +;;; COUNTDOWN.asm : a program for a tutorial that counts down to blast off ;;; Inputs: R0 is the address of counter. .ORIG x3000 ; Start at the beginning of user-space memory.