Skip to content

Commit

Permalink
Updates language-specific github actions (#2368)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroon-sheikh authored Jun 26, 2023
1 parent 6eb59d0 commit f6acd2b
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 69 deletions.
8 changes: 6 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ updates:
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
ignore:
- dependency-name: github.com/spf13/cobra
versions:
Expand All @@ -13,4 +12,9 @@ updates:
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
# Disable rebasing for npm pull requests
rebase-strategy: "disabled"
- package-ecosystem: 'npm'
directory: '/build/npm'
schedule:
interval: 'weekly'
20 changes: 10 additions & 10 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
BENCHMARK_OUT_DIR: "../out"

steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- uses: actions/checkout@v3
with:
go-version: 1.20
path: gauge
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'gauge/go.mod'
cache-dependency-path: 'gauge/go.sum'
id: go

- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 11

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/setup-java@v3
with:
path: gauge
distribution: 'temurin'
java-version: '11'

- name: Install Gauge
run: |
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go 1.20
uses: actions/setup-go@v1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'go.mod'
id: go

- name: Compile gauge
Expand All @@ -37,11 +36,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go 1.20
uses: actions/setup-go@v1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'go.mod'
id: go

- name: Prep installer generation
Expand Down Expand Up @@ -160,10 +158,11 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: '3.10'
cache: 'pip' # caching pip dependencies

- name: Fetch gauge version
uses: actions/download-artifact@v3
Expand All @@ -181,9 +180,8 @@ jobs:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
cd build/pip
pip install requests --user
pip install -r requirements.txt
python build.py --dist
pip install twine --user
gauge_package=`ls dist/$GAUGE_PACKAGE_NAME-$GAUGE_VERSION.tar.gz`
python -m twine upload -u $PYPI_USER -p $PYPI_PASSWORD $gauge_package
Expand All @@ -194,9 +192,11 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: '10.x'
node-version: 18
cache: 'npm'
cache-dependency-path: 'build/npm/package-lock.json'
registry-url: 'https://registry.npmjs.org'

- name: Fetch gauge version
Expand Down
74 changes: 33 additions & 41 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'go.mod'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Test
run: go run build/make.go --test --verbose

Expand All @@ -38,19 +36,19 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'go.mod'
id: go

- name: Set up Nodejs
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'

- name: Check out code into the Go module directory
uses: actions/checkout@v3
node-version: 18
cache: 'npm'
cache-dependency-path: 'build/npm/package-lock.json'

- name: Build
run: |
Expand All @@ -68,7 +66,6 @@ jobs:
go run build/make.go --install --verbose
echo "C:\\Program Files\\gauge\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Gauge (linux)
if: matrix.os != 'windows-latest'
run: |
Expand Down Expand Up @@ -107,19 +104,18 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'go.mod'
id: go

- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11

- name: Check out code into the Go module directory
uses: actions/checkout@v3
distribution: 'temurin'
java-version: '11'

- name: Build
run: go run build/make.go --verbose
Expand Down Expand Up @@ -149,7 +145,6 @@ jobs:
cd gauge-java
go run build/make.go && go run build/make.go --install
- name: Install Gauge Java maven package locally
run: |
cd gauge-java
Expand All @@ -174,7 +169,6 @@ jobs:
go run build/make.go && go run build/make.go --install
shell: bash


- name: Prep FTs
run: |
git clone https://github.com/getgauge/gauge-tests
Expand Down Expand Up @@ -210,15 +204,13 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'go.mod'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Build distro for ${{ matrix.os }}
run: go run build/make.go && go run build/make.go --distro

Expand All @@ -241,21 +233,21 @@ jobs:
BENCHMARK_OUT_DIR: "../out"

steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- uses: actions/checkout@v3
with:
path: gauge
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version-file: 'gauge/go.mod'
cache-dependency-path: 'gauge/go.sum'
id: go

- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
path: gauge
distribution: 'temurin'
java-version: '11'

- name: Install Gauge
run: |
Expand Down
24 changes: 23 additions & 1 deletion build/pip/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
requests
bleach==6.0.0
certifi==2023.5.7
charset-normalizer==3.1.0
docutils==0.20.1
idna==3.4
importlib-metadata==6.7.0
jaraco.classes==3.2.3
keyring==24.2.0
markdown-it-py==3.0.0
mdurl==0.1.2
more-itertools==9.1.0
pkginfo==1.9.6
Pygments==2.15.1
readme-renderer==40.0
requests==2.31.0
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.4.2
six==1.16.0
twine==4.0.2
urllib3==2.0.3
webencodings==0.5.1
zipp==3.15.0

0 comments on commit f6acd2b

Please sign in to comment.