Skip to content

Commit

Permalink
Merge pull request #19 from CDCgov/add-testing-ci
Browse files Browse the repository at this point in the history
Add testing of EpiAware to CI
  • Loading branch information
seabbs authored Feb 12, 2024
2 parents 3de1188 + 20c8f22 commit 7362a2e
Show file tree
Hide file tree
Showing 7 changed files with 1,400 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .github/actions/install-julia/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,22 @@ runs:
key: julia-binary-${{ inputs.version }}
restore-keys: |
julia-binary-${{ inputs.version }}
- name: Install Julia
if: steps.cache-julia.outputs.cache-hit != 'true'
run: |
mkdir -p ~/julia
version=$(echo ${{ inputs.version }} | cut -d. -f1,2)
wget https://julialang-s3.julialang.org/bin/linux/x64/$version/julia-${{ inputs.version }}-linux-x86_64.tar.gz -O ~/julia/julia.tar.gz
shell: bash
- run: tar -xzf ~/julia/julia.tar.gz -C ~/julia --strip-components=1

- name: Unzip Julia
run: tar -xzf ~/julia/julia.tar.gz -C ~/julia --strip-components=1
shell: bash

- run: echo "$HOME/julia/bin" >> $GITHUB_PATH
shell: bash

- uses: actions/cache@v3
with:
path: |
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/test-EpiAware.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test EpiAware

on:
pull_request:
push:
branches: [main]

jobs:
test-EpiAware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-julia
with:
version: '1.10.0'
- name: Run unit tests for EpiAware
run: julia --project=EpiAware -e 'using Pkg; Pkg.test()'
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ repos:
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: EpiAware/Manifest.toml
exclude: '.*/Manifest\.toml$'
2 changes: 1 addition & 1 deletion EpiAware/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "994dd97f3407acb923def45029b96a36ab4b1ffe"
project_hash = "b4d488971893c2da3a7e5ee0a7a6da358a2c3ba6"

[[deps.ADTypes]]
git-tree-sha1 = "41c37aa88889c171f1300ceac1313c06e891d245"
Expand Down
7 changes: 0 additions & 7 deletions EpiAware/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.1.0-DEV"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Expand All @@ -19,9 +18,3 @@ Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"

[compat]
julia = "1.9,1.10"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
Loading

0 comments on commit 7362a2e

Please sign in to comment.