Skip to content

Commit

Permalink
Use Docker on GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
lazamar committed Apr 7, 2024
1 parent 14606cc commit 9e4e008
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 44 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/ci.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: main

on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master]

run-name: ${{ github.workflow }} | ${{ github.event.pull_request.number }} ${{ github.event.pull_request.title || github.event.head_commit.message }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: docker build --tag nix-package-versions .
working-directory: ./

- name: Test
run: docker run nix-package-versions ./utils.sh test
8 changes: 4 additions & 4 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ function watch-test {
ghcid -c 'cabal v2-repl' nix-package-versions-test
}

function test {
cabal v2-run nix-package-versions-test
}

function server {
cabal v2-run nix-package-versions-exe -- \
server \
--port 8080 \
--db-root database
}

function test {
cabal v2-run nix-package-versions-test
}

function update-database {
# Load GitHub credentials
source $(pwd)/.secrets
Expand Down

0 comments on commit 9e4e008

Please sign in to comment.