integration_test #950
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: integration_test | |
on: | |
push: | |
pull_request_target: | |
schedule: | |
- cron: '30 5 * * *' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
EARTHLY_SECRETS: ${{ secrets.EARTHLY_SECRETS }} | |
FORCE_COLOR: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Put back the git branch into git (Earthly uses it for tagging) | |
run: | | |
branch="" | |
if [ -n "$GITHUB_HEAD_REF" ]; then | |
branch="$GITHUB_HEAD_REF" | |
else | |
branch="${GITHUB_REF##*/}" | |
fi | |
git checkout -b "$branch" || true | |
- name: Docker Login | |
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | |
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | |
- name: download latest earthly | |
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.15/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | |
- name: export secrets | |
if: ${{ !(github.event_name == 'push' && github.ref_name == 'master') }} | |
run: | | |
export GW2_API_KEY="" | |
export GW2_TESTING_CHAR="" | |
- name: build and run test | |
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | |
run: earthly --ci --push --remote-cache=greaka/gw2lib:cache -P +test | |
- name: build and run test | |
if: ${{ !(github.event_name == 'push' && github.ref_name == 'master') }} | |
run: earthly --ci --remote-cache=greaka/gw2lib:cache -P +test | |
test-ignored: | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 1 | |
EARTHLY_SECRETS: ${{ secrets.EARTHLY_SECRETS }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Put back the git branch into git (Earthly uses it for tagging) | |
run: | | |
branch="" | |
if [ -n "$GITHUB_HEAD_REF" ]; then | |
branch="$GITHUB_HEAD_REF" | |
else | |
branch="${GITHUB_REF##*/}" | |
fi | |
git checkout -b "$branch" || true | |
- name: download latest earthly | |
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.15/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | |
- name: export secrets | |
if: ${{ !(github.event_name == 'push' && github.ref_name == 'master') }} | |
run: | | |
export GW2_API_KEY="" | |
export GW2_TESTING_CHAR="" | |
- name: build and run test | |
run: earthly --ci --remote-cache=greaka/gw2lib:cache -P +test-ignored |