From 06e8e764fd05ad1f5ca0533ea8bb3730c2089147 Mon Sep 17 00:00:00 2001 From: Dami Date: Sun, 20 Nov 2022 15:24:06 -0500 Subject: [PATCH 1/2] add test workflow --- .github/workflows/github-actions-demo.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..3856190 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,20 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + From 83aa63d4811b9d9520637c745065bcec4a2a17e7 Mon Sep 17 00:00:00 2001 From: Dami Date: Sun, 20 Nov 2022 16:21:47 -0500 Subject: [PATCH 2/2] update workflow --- .github/workflows/github-actions-demo.yml | 29 +++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 3856190..f729f94 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,20 +1,25 @@ -name: GitHub Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +name: Testing +run-name: ${{ github.actor }} is running tests 🚀 on: [push] jobs: - Explore-GitHub-Actions: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go: ['1.17', '1.18', '1.19'] steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code uses: actions/checkout@v3 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + + - run : go get golang.org/x/lint/golint + + - name: Run make + run: make