Skip to content

Commit

Permalink
Merge pull request #190 from HarrisonWAffel/gha-migration
Browse files Browse the repository at this point in the history
migrate to github actions
  • Loading branch information
HarrisonWAffel authored May 29, 2024
2 parents 070f014 + 104777d commit 3b12f14
Show file tree
Hide file tree
Showing 8 changed files with 307 additions and 275 deletions.
239 changes: 0 additions & 239 deletions .drone.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Pull Request

on:
pull_request:

permissions:
contents: read

jobs:
# While golanglint-ci is also run in the mage file,
# adding an explicit gha step highlights the syntax errors
# when reviewing PRs
golint:
runs-on: windows-2022
steps:
- uses: actions/checkout@v1
- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64
with:
version: v1.55

test:
strategy:
fail-fast: false
matrix:
platform: [windows-2019, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install Dependencies
run: |
go install github.com/magefile/mage@v1.15.0
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
- name: Run E2E tests
shell: pwsh
run: |
Install-Module -Name DockerMsftProvider -Force
Import-Module -Name HostNetworkingService
set PSModulePath=&&powershell -command "mage TestAll"
18 changes: 18 additions & 0 deletions .github/workflows/label-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Label issues
on:
issues:
types:
- reopened
- opened
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: "team/area2"
22 changes: 0 additions & 22 deletions .github/workflows/main.yml

This file was deleted.

16 changes: 4 additions & 12 deletions .github/workflows/test.yaml → .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Tests
name: Merge

on:
push:
pull_request:
branches:
- main

permissions:
contents: read
Expand All @@ -13,18 +14,9 @@ jobs:
fail-fast: false
matrix:
platform: [windows-2019, windows-latest]

runs-on: ${{ matrix.platform }}

steps:
# Environment requirements:
# https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment
- name: Test docker
run: |
docker version
docker pull hello-world
docker run hello-world
- name: Checkout code
uses: actions/checkout@v4

Expand All @@ -35,7 +27,7 @@ jobs:

- name: Install Dependencies
run: |
go install github.com/magefile/mage@latest
go install github.com/magefile/mage@v1.15.0
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
- name: Run E2E tests
Expand Down
Loading

0 comments on commit 3b12f14

Please sign in to comment.