mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
36 lines
965 B
YAML
36 lines
965 B
YAML
name: Test
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@v2.1.3
|
|
with:
|
|
go-version: 1.18
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.name "Marvin Zhang"
|
|
git config --global user.email "tikazyq@163.com"
|
|
|
|
- name: Write Credentials
|
|
run: |
|
|
echo '${{ secrets.CREDENTIAL_JSON }}' > $GITHUB_WORKSPACE/credentials.json
|
|
echo '${{ secrets.CREDENTIAL_JSON }}' > $GITHUB_WORKSPACE/test/credentials.json
|
|
ls -l $GITHUB_WORKSPACE/test
|
|
mkdir -p $GITHUB_WORKSPACE/.ssh
|
|
echo "${{ secrets.SSH_KEY }}" > $GITHUB_WORKSPACE/id_rsa
|
|
ls -la $GITHUB_WORKSPACE
|
|
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
|
|
|
|
- name: Install
|
|
run: go mod tidy
|
|
|
|
- name: Run Tests
|
|
run: go test ./... -race
|