Skip to content

Commit

Permalink
Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveworley committed Apr 11, 2024
1 parent 9b8f12e commit b220ac4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/main.yml → .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
name: Docker
name: Build images

on:
schedule:
- cron: '17 3 * * *'
workflow_call: {}
workflow_dispatch:


env:
REGISTRY: ghcr.io
IMAGE_NAME: salsadigitalauorg/internal-services-monitor

jobs:

tests:
name: Test the monitor
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Run tests
run: go test ./...
lint-test:
uses: ./.github/worfklows/test.yml

build:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [lint-test]
permissions:
contents: read
packages: write
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test and lint

on:
workflow_call:
push:
branches:
- main
pull_request:

jobs:

lint-test:
name: Quality assurance
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'

- name: Vet
run : go vet ./...

- name: Tests
run: go test ./...

0 comments on commit b220ac4

Please sign in to comment.