Skip to content

Commit

Permalink
ci: test with alpine image
Browse files Browse the repository at this point in the history
  • Loading branch information
cleydyr committed Feb 21, 2024
1 parent 766bbfa commit 2ef6d6b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/java-ci-linux-musl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Java CI on Linux Alpine

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Build Docker Image
run: docker build -f Dockerfile-test-alpine -t alpine-test-image .

- name: Run Docker Container
run: docker run alpine-test-image
16 changes: 16 additions & 0 deletions Dockerfile-test-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Usa a imagem base do Alpine
FROM alpine:latest

# Instala o OpenJDK 8 e o Maven
RUN apk add --no-cache openjdk8 maven

# Copia os arquivos do diretório desejado para o container
COPY ./ /dart-sass-maven-plugin

# Define o diretório de trabalho
WORKDIR /dart-sass-maven-plugin

RUN cp /dart-sass-maven-plugin/src/test/resources/musl/test-project/pom.xml /dart-sass-maven-plugin/src/test/resources/test-project/pom.xml

# Comando padrão ou ação que será executada quando o container iniciar
CMD ["mvn", "test"]
42 changes: 42 additions & 0 deletions src/test/resources/musl/test-project/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.cleydyr</groupId>
<artifactId>test-project</artifactId>
<version>1.3.0-SNAPSHOT</version>

<name>test-project</name>
<description>A simple test-project.</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<build>
<plugins>
<plugin>
<groupId>io.github.cleydyr</groupId>
<artifactId>dart-sass-maven-plugin</artifactId>
<version>1.3.0-SNAPSHOT</version>
<configuration>
<outputFolder>${project.build.directory}/static/styles</outputFolder>
<style>COMPRESSED</style>
<version>1.71.1</version>
<os>linux-musl</os>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>compile-sass</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 2ef6d6b

Please sign in to comment.